public class RandomAccessStreamReader extends RandomAccessReader
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CHUNK_LENGTH |
Constructor and Description |
---|
RandomAccessStreamReader(InputStream stream) |
RandomAccessStreamReader(InputStream stream,
int chunkLength) |
RandomAccessStreamReader(InputStream stream,
int chunkLength,
long streamLength) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes(int index,
int count)
Returns the required number of bytes from the specified index from the underlying source.
|
long |
getLength()
Reads to the end of the stream, in order to determine the total number of bytes.
|
getBit, getDouble64, getFloat32, getInt16, getInt24, getInt32, getInt64, getInt8, getNullTerminatedString, getS15Fixed16, getString, getString, getUInt16, getUInt32, getUInt8, isMotorolaByteOrder, setMotorolaByteOrder
public static final int DEFAULT_CHUNK_LENGTH
public RandomAccessStreamReader(InputStream stream)
public RandomAccessStreamReader(InputStream stream, int chunkLength)
public RandomAccessStreamReader(InputStream stream, int chunkLength, long streamLength)
public long getLength() throws IOException
RandomAccessReader
.getLength
in class RandomAccessReader
IOException
public byte[] getBytes(int index, int count) throws IOException
RandomAccessReader
getBytes
in class RandomAccessReader
index
- The index from which the bytes begins in the underlying sourcecount
- The number of bytes to be returnedBufferBoundsException
- if the requested bytes extend beyond the end of the underlying data sourceIOException
- if the byte is unable to be readCopyright © 2017. All rights reserved.