|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.h2gis.drivers.utility.ReadBufferManager
public final class ReadBufferManager
| Constructor Summary | |
|---|---|
ReadBufferManager(FileChannel channel)
Instantiates a ReadBufferManager to read the specified channel |
|
ReadBufferManager(FileChannel channel,
int bufferSize)
Instantiates a ReadBufferManager to read the specified channel. |
|
| Method Summary | |
|---|---|
byte |
get()
Gets the byte value at the current position |
ByteBuffer |
get(byte[] buffer)
Gets the byte[] value at the current position |
ByteBuffer |
get(long pos,
byte[] buffer)
Gets the byte[] value at the specified position |
byte |
getByte(long bytePos)
Gets the byte value at the specified position |
double |
getDouble()
Gets the double value at the specified position |
double |
getDouble(long bytePos)
Gets the double value at the specified position |
int |
getInt()
Gets the int value at the current position |
int |
getInt(long bytePos)
Gets the int value at the specified position |
long |
getLength()
Gets the size of the channel |
long |
getLong()
Gets the long value at the current position |
long |
getLong(long bytePos)
Gets the long value at the specified position |
long |
getPosition()
Gets the positionf of this buffer in the file it's reading. |
boolean |
isEOF()
If the current position is at the end of the channel |
void |
order(ByteOrder order)
Specifies the byte order. |
void |
position(long position)
Moves the current position to the specified one |
long |
remaining()
Gets the number of remaining bytes in the current file, starting from the current position |
void |
skip(int numBytes)
skips the specified number of bytes from the current position in the channel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadBufferManager(FileChannel channel)
throws IOException
channel -
IOException
public ReadBufferManager(FileChannel channel,
int bufferSize)
throws IOException
channel - bufferSize -
IOException| Method Detail |
|---|
public byte getByte(long bytePos)
throws IOException
bytePos -
IOException
public long getLength()
throws IOException
IOExceptionpublic void order(ByteOrder order)
ByteBuffer
order -
public int getInt(long bytePos)
throws IOException
bytePos -
IOException
public long getLong(long bytePos)
throws IOException
bytePos -
IOException
public long getLong()
throws IOException
bytePos -
IOException
public byte get()
throws IOException
IOException
public int getInt()
throws IOException
IOException
public void skip(int numBytes)
throws IOException
numBytes -
IOException
public ByteBuffer get(byte[] buffer)
throws IOException
buffer -
IOException
public ByteBuffer get(long pos,
byte[] buffer)
throws IOException
pos - buffer -
IOExceptionpublic void position(long position)
position - public long getPosition()
public double getDouble()
throws IOException
IOException
public double getDouble(long bytePos)
throws IOException
bytePos -
IOException
public boolean isEOF()
throws IOException
IOException
public long remaining()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||