public class SwappedDataInputStream extends ProxyInputStream implements DataInput
Provenance: Avalon Excalibur (IO)
ProxyInputStream.AbstractBuilder<T,B extends AbstractStreamBuilder<T,B>>in| Constructor and Description |
|---|
SwappedDataInputStream(InputStream input)
Constructs a SwappedDataInputStream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
readBoolean()
Return
|
byte |
readByte()
Invokes the delegate's
read() method. |
char |
readChar()
Reads a 2 byte, unsigned, little endian UTF-16 code point.
|
double |
readDouble()
Reads an 8 byte, two's complement, little-endian long.
|
float |
readFloat()
Reads a 4 byte, IEEE 754, little-endian float.
|
void |
readFully(byte[] data)
Invokes the delegate's
read(byte[] data, int, int) method. |
void |
readFully(byte[] data,
int offset,
int length)
Invokes the delegate's
read(byte[] data, int, int) method. |
int |
readInt()
Reads a 4 byte, two's complement little-endian integer.
|
String |
readLine()
Not currently supported - throws
UnsupportedOperationException. |
long |
readLong()
Reads an 8 byte, two's complement little-endian integer.
|
short |
readShort()
Reads a 2 byte, two's complement, little-endian integer.
|
int |
readUnsignedByte()
Invokes the delegate's
read() method. |
int |
readUnsignedShort()
Reads a 2 byte, unsigned, little-endian integer.
|
String |
readUTF()
Not currently supported - throws
UnsupportedOperationException. |
int |
skipBytes(int count)
Invokes the delegate's
skip(int) method. |
afterRead, available, beforeRead, checkOpen, close, handleIOException, isClosed, mark, markSupported, read, read, read, reset, setReference, skip, unwrappublic SwappedDataInputStream(InputStream input)
input - InputStream to read frompublic boolean readBoolean()
throws IOException,
EOFException
readByte() != 0readBoolean in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic byte readByte()
throws IOException,
EOFException
read() method.readByte in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic char readChar()
throws IOException,
EOFException
readChar in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic double readDouble()
throws IOException,
EOFException
readDouble in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic float readFloat()
throws IOException,
EOFException
readFloat in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic void readFully(byte[] data)
throws IOException,
EOFException
read(byte[] data, int, int) method.readFully in interface DataInputdata - the buffer to read the bytes intoEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public void readFully(byte[] data,
int offset,
int length)
throws IOException,
EOFException
read(byte[] data, int, int) method.readFully in interface DataInputdata - the buffer to read the bytes intooffset - The start offsetlength - The number of bytes to readEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public int readInt()
throws IOException,
EOFException
readInt in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public String readLine() throws IOException, EOFException
UnsupportedOperationException.readLine in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occursUnsupportedOperationException - alwayspublic long readLong()
throws IOException,
EOFException
readLong in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public short readShort()
throws IOException,
EOFException
readShort in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public int readUnsignedByte()
throws IOException,
EOFException
read() method.readUnsignedByte in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public int readUnsignedShort()
throws IOException,
EOFException
readUnsignedShort in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public String readUTF() throws IOException, EOFException
UnsupportedOperationException.readUTF in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occursUnsupportedOperationException - alwayspublic int skipBytes(int count)
throws IOException
skip(int) method.skipBytes in interface DataInputcount - the number of bytes to skipIOException - if an I/O error occurs