org.annolab.tt4j
Class LittleEndianDataInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.annolab.tt4j.LittleEndianDataInputStream
All Implemented Interfaces:
Closeable, DataInput

public class LittleEndianDataInputStream
extends InputStream
implements DataInput


Constructor Summary
LittleEndianDataInputStream(InputStream aIn)
           
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
          like DataInputStream.readChar except little endian.
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
          like DataInputStream.readInt except little endian.
 String readLine()
          Deprecated. 
 long readLong()
          like DataInputStream.readLong except little endian.
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
          Note, returns int even though it reads a short.
 String readUTF()
           
 int skipBytes(int n)
           
 
Methods inherited from class java.io.InputStream
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

LittleEndianDataInputStream

public LittleEndianDataInputStream(InputStream aIn)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

readShort

public final short readShort()
                      throws IOException
Specified by:
readShort in interface DataInput
Throws:
IOException

readUnsignedShort

public final int readUnsignedShort()
                            throws IOException
Note, returns int even though it reads a short.

Specified by:
readUnsignedShort in interface DataInput
Throws:
IOException

readChar

public final char readChar()
                    throws IOException
like DataInputStream.readChar except little endian.

Specified by:
readChar in interface DataInput
Throws:
IOException

readInt

public final int readInt()
                  throws IOException
like DataInputStream.readInt except little endian.

Specified by:
readInt in interface DataInput
Throws:
IOException

readLong

public final long readLong()
                    throws IOException
like DataInputStream.readLong except little endian.

Specified by:
readLong in interface DataInput
Throws:
IOException

readFloat

public final float readFloat()
                      throws IOException
Specified by:
readFloat in interface DataInput
Throws:
IOException

readDouble

public final double readDouble()
                        throws IOException
Specified by:
readDouble in interface DataInput
Throws:
IOException

read

public final int read(byte[] b,
                      int off,
                      int len)
               throws IOException
Overrides:
read in class InputStream
Throws:
IOException

readFully

public final void readFully(byte[] b)
                     throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

readFully

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

skipBytes

public final int skipBytes(int n)
                    throws IOException
Specified by:
skipBytes in interface DataInput
Throws:
IOException

readBoolean

public final boolean readBoolean()
                          throws IOException
Specified by:
readBoolean in interface DataInput
Throws:
IOException

readByte

public final byte readByte()
                    throws IOException
Specified by:
readByte in interface DataInput
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

readUnsignedByte

public final int readUnsignedByte()
                           throws IOException
Specified by:
readUnsignedByte in interface DataInput
Throws:
IOException

readLine

@Deprecated
public final String readLine()
                      throws IOException
Deprecated. 

Specified by:
readLine in interface DataInput
Throws:
IOException

readUTF

public final String readUTF()
                     throws IOException
Specified by:
readUTF in interface DataInput
Throws:
IOException

close

public final void close()
                 throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException


Copyright © 2012. All Rights Reserved.