utilities
Class LittleEndianReader

java.lang.Object
  |
  +--utilities.LittleEndianReader

public class LittleEndianReader
extends java.lang.Object


Constructor Summary
LittleEndianReader(java.io.InputStream in)
           
 
Method Summary
 int readInt()
          Read 4 bytes, flip from Little to Big Endian, and return the corresponding int.
 void readRawBytes(byte[] buffer)
          Read a byte array as-is.
 short readShort()
          Read 2 bytes, flip from Little to Big Endian, and return the corresponding short.
 java.lang.String readString(int nBytes)
          Read n bytes, and store as a string.
 void skip(int n)
          Skip n bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LittleEndianReader

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

readInt

public int readInt()
            throws java.io.IOException
Read 4 bytes, flip from Little to Big Endian, and return the corresponding int.

readShort

public short readShort()
                throws java.io.IOException
Read 2 bytes, flip from Little to Big Endian, and return the corresponding short.

readString

public java.lang.String readString(int nBytes)
                            throws java.io.IOException
Read n bytes, and store as a string.

readRawBytes

public void readRawBytes(byte[] buffer)
                  throws java.io.IOException
Read a byte array as-is. That is, no conversion is done.

skip

public void skip(int n)
          throws java.io.IOException
Skip n bytes.