com.badlogic.gdx.utils
Class DataInput
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
com.badlogic.gdx.utils.DataInput
- All Implemented Interfaces:
- Closeable, DataInput
public class DataInput
- extends DataInputStream
Extends DataInputStream
with additional convenience methods.
- Author:
- Nathan Sweet
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 |
DataInput
public DataInput(InputStream in)
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.