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, setMotorolaByteOrderpublic 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 RandomAccessReaderIOExceptionpublic byte[] getBytes(int index,
int count)
throws IOException
RandomAccessReadergetBytes in class RandomAccessReaderindex - 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 © 2002-2016 Drew Noakes. All Rights Reserved.