|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.jopendocument.io.LittleEndianInputStream
public class LittleEndianInputStream
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
LittleEndianInputStream(InputStream in)
Creates a new little endian input stream and chains it to the input stream specified by the in argument. |
|
| Method Summary | |
|---|---|
boolean |
readBoolean()
Reads a boolean from the underlying input stream by reading a single byte. |
byte |
readByte(int b)
Reads a signed byte from the underlying input stream with value between -128 and
127 |
char |
readChar()
Reads a two byte Unicode char from the underlying input stream in little endian
order, low byte first. |
double |
readDouble()
|
float |
readFloat()
|
int |
readInt()
Reads a four byte signed int from the underlying input stream in little endian
order, low byte first. |
long |
readLong()
Reads an eight byte signed int from the underlying input stream in little endian
order, low byte first. |
short |
readShort()
Reads a two byte signed short from the underlying input stream in little endian
order, low byte first. |
int |
readUnsignedByte()
Reads an unsigned byte from the underlying input stream with value between 0 and
255 |
int |
readUnsignedShort()
Reads a two byte unsigned short from the underlying input stream in little
endian order, low byte first. |
String |
readUTF()
Reads a string of no more than 65,535 characters from the underlying input stream using UTF-8 encoding. |
int |
skipBytes(int n)
Skip exactly n bytes of input in the underlying input stream. |
| Methods inherited from class java.io.FilterInputStream |
|---|
available, close, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LittleEndianInputStream(InputStream in)
in - the underlying input stream.java.io.FilterInputStream#out| Method Detail |
|---|
public boolean readBoolean()
throws IOException
boolean from the underlying input stream by reading a single byte. If
the byte is zero, false is returned. If the byte is positive, true is returned.
boolean value read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public byte readByte(int b)
throws IOException
byte from the underlying input stream with value between -128 and
127
byte value read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public int readUnsignedByte()
throws IOException
byte from the underlying input stream with value between 0 and
255
byte value read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public short readShort()
throws IOException
short from the underlying input stream in little endian
order, low byte first.
short read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public int readUnsignedShort()
throws IOException
short from the underlying input stream in little
endian order, low byte first.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public char readChar()
throws IOException
char from the underlying input stream in little endian
order, low byte first.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public int readInt()
throws IOException
int from the underlying input stream in little endian
order, low byte first.
int read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public long readLong()
throws IOException
int from the underlying input stream in little endian
order, low byte first.
int read.
EOFException - if the end of the underlying input stream has been reached
IOException - if the underlying stream throws an IOException.
public String readUTF()
throws IOException
UTFDataFormatException - if the string cannot be decoded
IOException - if the underlying stream throws an IOException.
public final double readDouble()
throws IOException
double.
EOFException - if end of stream occurs before eight bytes have been read.
IOException - if an I/O error occurs.
public final float readFloat()
throws IOException
int.
EOFException - if end of stream occurs before four bytes have been read.
IOException - if an I/O error occurs.
public final int skipBytes(int n)
throws IOException
n bytes of input in the underlying input stream. This method blocks
until all the bytes are skipped, the end of the stream is detected, or an exception is
thrown.
n - the number of bytes to skip.
EOFException - if this input stream reaches the end before skipping all the bytes.
IOException - if the underlying stream throws an IOException.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||