public class SequentialByteArrayReader extends SequentialReader
| Constructor and Description |
|---|
SequentialByteArrayReader(byte[] bytes) |
SequentialByteArrayReader(byte[] bytes,
int baseIndex) |
| Modifier and Type | Method and Description |
|---|---|
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, setMotorolaByteOrderpublic SequentialByteArrayReader(byte[] bytes)
public SequentialByteArrayReader(byte[] bytes,
int baseIndex)
public byte[] getBytes(int count)
throws IOException
SequentialReadergetBytes in class SequentialReadercount - The number of bytes to be returnedIOExceptionpublic void skip(long n)
throws IOException
SequentialReaderEOFException is thrown.skip in class SequentialReadern - 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
SequentialReadertrySkip in class SequentialReadern - the number of byte to skip. Must be zero or greater.IOException - an error occurred reading from the underlying source.Copyright © 2002-2016 Drew Noakes. All Rights Reserved.