public class SwappedDataInputStream extends ProxyInputStream implements java.io.DataInput
Provenance: Avalon Excalibur (IO)
| Constructor and Description |
|---|
SwappedDataInputStream(java.io.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.
|
java.lang.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.
|
java.lang.String |
readUTF()
Not currently supported - throws
UnsupportedOperationException. |
int |
skipBytes(int count)
Invokes the delegate's
skip(int) method. |
afterRead, available, beforeRead, close, handleIOException, mark, markSupported, read, read, read, reset, skip, unwrappublic SwappedDataInputStream(java.io.InputStream input)
input - InputStream to read frompublic boolean readBoolean()
throws java.io.IOException,
java.io.EOFException
readByte() != 0readBoolean in interface java.io.DataInputjava.io.IOException - if an I/O error occurs.java.io.EOFException - if an end of file is reached unexpectedlypublic byte readByte()
throws java.io.IOException,
java.io.EOFException
read() method.readByte in interface java.io.DataInputjava.io.IOException - if an I/O error occurs.java.io.EOFException - if an end of file is reached unexpectedlypublic char readChar()
throws java.io.IOException,
java.io.EOFException
readChar in interface java.io.DataInputjava.io.IOException - if an I/O error occurs.java.io.EOFException - if an end of file is reached unexpectedlypublic double readDouble()
throws java.io.IOException,
java.io.EOFException
readDouble in interface java.io.DataInputjava.io.IOException - if an I/O error occurs.java.io.EOFException - if an end of file is reached unexpectedlypublic float readFloat()
throws java.io.IOException,
java.io.EOFException
readFloat in interface java.io.DataInputjava.io.IOException - if an I/O error occurs.java.io.EOFException - if an end of file is reached unexpectedlypublic void readFully(byte[] data)
throws java.io.IOException,
java.io.EOFException
read(byte[] data, int, int) method.readFully in interface java.io.DataInputdata - the buffer to read the bytes intojava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public void readFully(byte[] data,
int offset,
int length)
throws java.io.IOException,
java.io.EOFException
read(byte[] data, int, int) method.readFully in interface java.io.DataInputdata - the buffer to read the bytes intooffset - The start offsetlength - The number of bytes to readjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public int readInt()
throws java.io.IOException,
java.io.EOFException
readInt in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public java.lang.String readLine()
throws java.io.IOException,
java.io.EOFException
UnsupportedOperationException.readLine in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - alwayspublic long readLong()
throws java.io.IOException,
java.io.EOFException
readLong in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public short readShort()
throws java.io.IOException,
java.io.EOFException
readShort in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public int readUnsignedByte()
throws java.io.IOException,
java.io.EOFException
read() method.readUnsignedByte in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public int readUnsignedShort()
throws java.io.IOException,
java.io.EOFException
readUnsignedShort in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.public java.lang.String readUTF()
throws java.io.IOException,
java.io.EOFException
UnsupportedOperationException.readUTF in interface java.io.DataInputjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - alwayspublic int skipBytes(int count)
throws java.io.IOException
skip(int) method.skipBytes in interface java.io.DataInputcount - the number of bytes to skipjava.io.IOException - if an I/O error occurs