InputStream providing LittleEndianInputThis class does not buffer any input, so the stream read position maintained by this class is consistent with that of the inner stream.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public int | available()
Overrides java. Implements org. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. |
| private static void | |
| public int | |
| public synchronized void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readlimit)Overrides java. Marks the current position in this input stream. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| public byte | |
| public double | |
| public float | Returns: the float (32-bit) valueget a float value, reads it in little endian format then converts the resulting revolting IEEE 754 (curse them) floating point number to a happy java float |
| public void | |
| public void | |
| public int | |
| public long | |
| public void | readPlain(byte[]
the byte array to receive the bytes buf, int the start offset into the byte array off, int the amount of bytes to fill len)Implements org. Usually acts the same as |
| public short | |
| public int | |
| public long | |
| public int | |
| public synchronized void | reset()
Overrides java. Repositions this stream to the position at the time the
|
| public void |
| BUFFERED_SIZE | back to summary |
|---|---|
| private static final int BUFFERED_SIZE | |
| EOF | back to summary |
|---|---|
| private static final int EOF | |
| markIndex | back to summary |
|---|---|
| private int markIndex | |
| readIndex | back to summary |
|---|---|
| private int readIndex | |
| LittleEndianInputStream | back to summary |
|---|---|
| public LittleEndianInputStream(InputStream is) | |
| _read | back to summary |
|---|---|
| private int _read(byte[] buffer, int offset, int length) throws IOException | |
| available | back to summary |
|---|---|
| public int available() Overrides java. Implements org. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
| |
| checkEOF | back to summary |
|---|---|
| private static void checkEOF(int actualBytes, int expectedBytes) | |
| getReadIndex | back to summary |
|---|---|
| public int getReadIndex() | |
| mark | back to summary |
|---|---|
| public synchronized void mark(int readlimit) Overrides java. Doc from java. Marks the current position in this input stream. A subsequent
call to the
The
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| readByte | back to summary |
|---|---|
| public byte readByte() Implements org.
| |
| readDouble | back to summary |
|---|---|
| public double readDouble() Implements org.
| |
| readFloat | back to summary |
|---|---|
| public float readFloat() get a float value, reads it in little endian format then converts the resulting revolting IEEE 754 (curse them) floating point number to a happy java float
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf) Implements org.
| |
| readFully | back to summary |
|---|---|
| public void readFully(byte[] buf, int off, int len) Implements org.
| |
| readInt | back to summary |
|---|---|
| public int readInt() Implements org.
| |
| readLong | back to summary |
|---|---|
| public long readLong() Implements org.
| |
| readPlain | back to summary |
|---|---|
| public void readPlain(byte[] buf, int off, int len) Implements org. Doc from org. Usually acts the same as
| |
| readShort | back to summary |
|---|---|
| public short readShort() Implements org.
| |
| readUByte | back to summary |
|---|---|
| public int readUByte() Implements org.
| |
| readUInt | back to summary |
|---|---|
| public long readUInt() get an unsigned int value from an InputStream
| |
| readUShort | back to summary |
|---|---|
| public int readUShort() Implements org.
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() throws IOException Overrides java. Doc from java. Repositions this stream to the position at the time the
Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.
| |
| skipFully | back to summary |
|---|---|
| public void skipFully(int len) throws IOException | |