libgdx API

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:
java.io.Closeable, java.io.DataInput

public class DataInput
extends java.io.DataInputStream

Extends DataInputStream with additional convenience methods.

Author:
Nathan Sweet

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DataInput(java.io.InputStream in)
           
 
Method Summary
 int readInt(boolean optimizePositive)
          Reads a 1-5 byte int.
 java.lang.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataInput

public DataInput(java.io.InputStream in)
Method Detail

readInt

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

Throws:
java.io.IOException

readString

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

Returns:
May be null.
Throws:
java.io.IOException

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)