public class TrieReader extends Object
| Constructor and Description |
|---|
TrieReader(FileChannel reader)
Creates the class by creating multiple ByteBuffers that can be read from.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Clears the ByteBuffers and closes the File Channel.
|
long |
getPos()
Returns the current logical position value.
|
byte |
readByte() |
byte[] |
readBytes(int length) |
int |
readInt()
Read an signed integer from the file at the current location.
|
long |
readLong()
Read an signed long from the file at the current location.
|
long |
readLong(long position)
Read an signed long from the file at a specified location.
|
short |
readUByte()
Read an Unsigned byte from the file at the current location.
|
short |
readUByte(long position)
Read an Unsigned byte from the file at a specified location.
|
long |
readUInt()
Read an Unsigned integer from the file at the current location.
|
int |
readUShort()
Read an Unsigned short from the file at the current location.
|
int |
readUShort(long position)
Read an Unsigned short from the file at a specified location.
|
void |
setPos(long position)
Sets the logical position in the file.
|
public TrieReader(FileChannel reader) throws IOException
reader - File channel to read from.IOException - indicates an I/O exception occurredpublic long getPos()
public void setPos(long position)
position - position value.public short readUByte()
public short readUByte(long position)
position - Position to read from.public int readUShort()
public int readUShort(long position)
position - Position to read from.public long readUInt()
throws IOException
IOException - indicates an I/O exception occurredpublic int readInt()
throws IOException
IOException - indicates an I/O exception occurredpublic long readLong()
public long readLong(long position)
throws IOException
position - Position to read from.IOException - indicates an I/O exception occurredpublic byte readByte()
public byte[] readBytes(int length)
public void close()
throws IOException
IOException - indicates an I/O exception occurredCopyright © 2015 51Degrees. All rights reserved.