com.google.appengine.api.files
Interface RecordReadChannel
-
Deprecated.
@Deprecated public interface RecordReadChannel
A channel for reading records from aFileReadChannel
.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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description long
position()
Deprecated.Returns the position in the underlyingFileReadChannel
.void
position(long newPosition)
Deprecated.Sets the read position of the underlyingFileReadChannel
.java.nio.ByteBuffer
readRecord()
Deprecated.Reads a record from the file and returns it in aByteBuffer
.
-
-
-
Method Detail
-
readRecord
java.nio.ByteBuffer readRecord() throws java.io.IOException
Deprecated.Reads a record from the file and returns it in aByteBuffer
. This ByteBuffer is reused, so if the user would like to save the result ofreadRecord()
, they need to copy the output of this method.- Returns:
- a
ByteBuffer
containing the record. - Throws:
java.io.IOException
-
position
long position() throws java.io.IOException
Deprecated.Returns the position in the underlyingFileReadChannel
.- Returns:
- the position.
- Throws:
java.io.IOException
-
position
void position(long newPosition) throws java.io.IOException
Deprecated.Sets the read position of the underlyingFileReadChannel
. The position value should only be set using the value obtained from a previousposition()
call.- Parameters:
newPosition
- the position at which to set the reader.- Throws:
java.io.IOException
-
-