org.apache.commons.io.input
Class SwappedDataInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.apache.commons.io.input.ProxyInputStream
              extended byorg.apache.commons.io.input.SwappedDataInputStream
All Implemented Interfaces:
java.io.DataInput

public class SwappedDataInputStream
extends ProxyInputStream
implements java.io.DataInput

DataInput for systems relying on little endian data formats.

Origin of code: Avalon Excalibur (IO)

Version:
CVS $Revision: 1.6 $ $Date: 2003/12/30 06:56:22 $
Author:
Peter Donald

Field Summary
 
Fields inherited from class org.apache.commons.io.input.ProxyInputStream
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
SwappedDataInputStream(java.io.InputStream input)
          Constructs a SwappedDataInputStream.
 
Method Summary
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] data)
           
 void readFully(byte[] data, int offset, int length)
           
 int readInt()
           
 java.lang.String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 int skipBytes(int count)
           
 
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwappedDataInputStream

public SwappedDataInputStream(java.io.InputStream input)
Constructs a SwappedDataInputStream.

Parameters:
input - InputStream to read from
Method Detail

readBoolean

public boolean readBoolean()
                    throws java.io.IOException,
                           java.io.EOFException
Specified by:
readBoolean in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readBoolean()

readByte

public byte readByte()
              throws java.io.IOException,
                     java.io.EOFException
Specified by:
readByte in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readByte()

readChar

public char readChar()
              throws java.io.IOException,
                     java.io.EOFException
Specified by:
readChar in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readChar()

readDouble

public double readDouble()
                  throws java.io.IOException,
                         java.io.EOFException
Specified by:
readDouble in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readDouble()

readFloat

public float readFloat()
                throws java.io.IOException,
                       java.io.EOFException
Specified by:
readFloat in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readFloat()

readFully

public void readFully(byte[] data)
               throws java.io.IOException,
                      java.io.EOFException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readFully(byte[])

readFully

public void readFully(byte[] data,
                      int offset,
                      int length)
               throws java.io.IOException,
                      java.io.EOFException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readFully(byte[], int, int)

readInt

public int readInt()
            throws java.io.IOException,
                   java.io.EOFException
Specified by:
readInt in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readInt()

readLine

public java.lang.String readLine()
                          throws java.io.IOException,
                                 java.io.EOFException
Specified by:
readLine in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readLine()

readLong

public long readLong()
              throws java.io.IOException,
                     java.io.EOFException
Specified by:
readLong in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readLong()

readShort

public short readShort()
                throws java.io.IOException,
                       java.io.EOFException
Specified by:
readShort in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readShort()

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException,
                            java.io.EOFException
Specified by:
readUnsignedByte in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readUnsignedByte()

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException,
                             java.io.EOFException
Specified by:
readUnsignedShort in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readUnsignedShort()

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException,
                                java.io.EOFException
Specified by:
readUTF in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.readUTF()

skipBytes

public int skipBytes(int count)
              throws java.io.IOException,
                     java.io.EOFException
Specified by:
skipBytes in interface java.io.DataInput
Throws:
java.io.IOException
java.io.EOFException
See Also:
DataInput.skipBytes(int)