|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RecordReadChannel
A channel for reading records from a FileReadChannel.
The format of these records is defined by the leveldb log format: http://leveldb.googlecode.com/svn/trunk/doc/log_format.txt
An instance of RecordReadChannel may be obtained from the method:
FileService.openRecordReadChannel(AppEngineFile, boolean).
| Method Summary | |
|---|---|
long |
position()
Returns the position in the underlying FileReadChannel. |
void |
position(long newPosition)
Sets the read position of the underlying FileReadChannel. |
java.nio.ByteBuffer |
readRecord()
Reads a record from the file and returns it in a ByteBuffer. |
| Method Detail |
|---|
java.nio.ByteBuffer readRecord()
throws java.io.IOException
ByteBuffer. This ByteBuffer is
reused, so if the user would like to save the result of readRecord(), they need
to copy the output of this method.
ByteBuffer containing the record.
java.io.IOException
long position()
throws java.io.IOException
FileReadChannel.
java.io.IOException
void position(long newPosition)
throws java.io.IOException
FileReadChannel. The position value should
only be set using the value obtained from a previous position() call.
newPosition - the position at which to set the reader.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||