com.badlogic.gdx.utils
Class DataInput

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by com.badlogic.gdx.utils.DataInput
All Implemented Interfaces:
Closeable, DataInput

public class DataInput
extends DataInputStream

Extends DataInputStream with additional convenience methods.

Author:
Nathan Sweet

Constructor Summary
DataInput(InputStream in)
           
 
Method Summary
 int readInt(boolean optimizePositive)
          Reads a 1-5 byte int.
 String readString()
          Reads the length and string of UTF8 characters, or null.
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataInput

public DataInput(InputStream in)
Method Detail

readInt

public int readInt(boolean optimizePositive)
            throws IOException
Reads a 1-5 byte int.

Throws:
IOException

readString

public String readString()
                  throws IOException
Reads the length and string of UTF8 characters, or null.

Returns:
May be null.
Throws:
IOException


Copyright © 2013. All Rights Reserved.