public class SwappedDataInputStream extends ProxyInputStream implements DataInput
Origin of code: Avalon Excalibur (IO)
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 character delegating to
readShort(). |
double |
readDouble()
Delegates to
EndianUtils.readSwappedDouble(InputStream). |
float |
readFloat()
Delegates to
EndianUtils.readSwappedFloat(InputStream). |
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()
Delegates to
EndianUtils.readSwappedInteger(InputStream). |
String |
readLine()
Not currently supported - throws
UnsupportedOperationException. |
long |
readLong()
Delegates to
EndianUtils.readSwappedLong(InputStream). |
short |
readShort()
Delegates to
EndianUtils.readSwappedShort(InputStream). |
int |
readUnsignedByte()
Invokes the delegate's
read() method. |
int |
readUnsignedShort()
Delegates to
EndianUtils.readSwappedUnsignedShort(InputStream). |
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, skippublic 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
readShort().readChar in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic double readDouble()
throws IOException,
EOFException
EndianUtils.readSwappedDouble(InputStream).readDouble in interface DataInputIOException - if an I/O error occurs.EOFException - if an end of file is reached unexpectedlypublic float readFloat()
throws IOException,
EOFException
EndianUtils.readSwappedFloat(InputStream).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
EndianUtils.readSwappedInteger(InputStream).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 occurs.public long readLong()
throws IOException,
EOFException
EndianUtils.readSwappedLong(InputStream).readLong in interface DataInputEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.public short readShort()
throws IOException,
EOFException
EndianUtils.readSwappedShort(InputStream).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
EndianUtils.readSwappedUnsignedShort(InputStream).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 occurs.public int skipBytes(int count)
throws IOException,
EOFException
skip(int) method.skipBytes in interface DataInputcount - the number of bytes to skipEOFException - if an end of file is reached unexpectedlyIOException - if an I/O error occurs.Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.