public class BinaryReader extends Object implements Disposable
| Modifier and Type | Field and Description |
|---|---|
private ByteBuffer |
byteBuffer |
private FileChannel |
channel |
List<Integer> |
list
List of integers used to create arrays of integers where the length of
the list is not known before reading starts.
|
| Constructor and Description |
|---|
BinaryReader(byte[] data) |
BinaryReader(ByteBuffer byteBuffer) |
BinaryReader(FileInputStream fileInputStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
boolean |
readBoolean() |
byte |
readByte() |
byte[] |
readBytes(int length) |
short |
readInt16() |
int |
readInt32() |
void |
setPos(int pos) |
public final List<Integer> list
private ByteBuffer byteBuffer
private FileChannel channel
public BinaryReader(byte[] data)
public BinaryReader(FileInputStream fileInputStream) throws IOException
IOExceptionpublic BinaryReader(ByteBuffer byteBuffer)
public void setPos(int pos)
public byte readByte()
public short readInt16()
public int readInt32()
public boolean readBoolean()
public byte[] readBytes(int length)
public void dispose()
dispose in interface Disposable