org.apache.commons.io.input

Class SwappedDataInputStream

Implemented Interfaces:
DataInput

public class SwappedDataInputStream
extends ProxyInputStream
implements DataInput

DataInput for systems relying on little endian data formats. When read, values will be changed from little endian to big endian formats for internal usage.

Origin of code: Avalon Excalibur (IO)

Version:
CVS $Revision: 1.8 $ $Date: 2004/02/23 04:56:59 $
Author:
Peter Donald

Field Summary

Fields inherited from class org.apache.commons.io.input.ProxyInputStream

proxy

Constructor Summary

SwappedDataInputStream(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()
String
readLine()
Not currently supported.
long
readLong()
short
readShort()
String
readUTF()
Not currently supported.
int
readUnsignedByte()
int
readUnsignedShort()
int
skipBytes(int count)

Methods inherited from class org.apache.commons.io.input.ProxyInputStream

available, close, mark, markSupported, read, read, read, reset, skip

Constructor Details

SwappedDataInputStream

public SwappedDataInputStream(InputStream input)
Constructs a SwappedDataInputStream.
Parameters:
input - InputStream to read from

Method Details

readBoolean

public boolean readBoolean()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readBoolean()

readByte

public byte readByte()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readByte()

readChar

public char readChar()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readChar()

readDouble

public double readDouble()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readDouble()

readFloat

public float readFloat()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readFloat()

readFully

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

readFully

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

readInt

public int readInt()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readInt()

readLine

public String readLine()
            throws IOException,
                   EOFException
Not currently supported.
See Also:
java.io.DataInput.readLine()

readLong

public long readLong()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readLong()

readShort

public short readShort()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readShort()

readUTF

public String readUTF()
            throws IOException,
                   EOFException
Not currently supported.
See Also:
java.io.DataInput.readUTF()

readUnsignedByte

public int readUnsignedByte()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readUnsignedByte()

readUnsignedShort

public int readUnsignedShort()
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.readUnsignedShort()

skipBytes

public int skipBytes(int count)
            throws IOException,
                   EOFException
See Also:
java.io.DataInput.skipBytes(int)