public class SwappedDataInputStream extends ProxyInputStream implements java.io.DataInput
Origin of code: 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 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). |
java.lang.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). |
java.lang.String |
readUTF()
Not currently supported - throws
UnsupportedOperationException. |
int |
skipBytes(int count)
Invokes the delegate's
skip(int) method. |
available, close, mark, markSupported, read, read, read, reset, skippublic 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
readShort().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
EndianUtils.readSwappedDouble(InputStream).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
EndianUtils.readSwappedFloat(InputStream).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
EndianUtils.readSwappedInteger(InputStream).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 occurs.public long readLong()
throws java.io.IOException,
java.io.EOFException
EndianUtils.readSwappedLong(InputStream).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
EndianUtils.readSwappedShort(InputStream).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
EndianUtils.readSwappedUnsignedShort(InputStream).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 occurs.public int skipBytes(int count)
throws java.io.IOException,
java.io.EOFException
skip(int) method.skipBytes in interface java.io.DataInputcount - the number of bytes to skipjava.io.EOFException - if an end of file is reached unexpectedlyjava.io.IOException - if an I/O error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved