public class StreamReader extends SequentialReader
Constructor and Description |
---|
StreamReader(InputStream stream) |
Modifier and Type | Method and Description |
---|---|
protected byte |
getByte()
Gets the next byte in the sequence.
|
byte[] |
getBytes(int count)
Returns the required number of bytes from the sequence.
|
void |
skip(long n)
Skips forward in the sequence.
|
boolean |
trySkip(long n)
Skips forward in the sequence, returning a boolean indicating whether the skip succeeded, or whether the sequence ended.
|
getDouble64, getFloat32, getInt16, getInt32, getInt64, getInt8, getNullTerminatedString, getS15Fixed16, getString, getString, getUInt16, getUInt32, getUInt8, isMotorolaByteOrder, setMotorolaByteOrder
public StreamReader(InputStream stream)
protected byte getByte() throws IOException
SequentialReader
getByte
in class SequentialReader
IOException
public byte[] getBytes(int count) throws IOException
SequentialReader
getBytes
in class SequentialReader
count
- The number of bytes to be returnedIOException
public void skip(long n) throws IOException
SequentialReader
EOFException
is thrown.skip
in class SequentialReader
n
- the number of byte to skip. Must be zero or greater.EOFException
- the end of the sequence is reached.IOException
- an error occurred reading from the underlying source.public boolean trySkip(long n) throws IOException
SequentialReader
trySkip
in class SequentialReader
n
- the number of byte to skip. Must be zero or greater.IOException
- an error occurred reading from the underlying source.Copyright © 2002-2015 Drew Noakes. All Rights Reserved.