com.google.appengine.api.files
Interface RecordWriteChannel

All Superinterfaces:
java.nio.channels.Channel, java.io.Closeable, java.nio.channels.WritableByteChannel
All Known Implementing Classes:
RecordWriteChannelImpl

public interface RecordWriteChannel
extends java.nio.channels.WritableByteChannel

A @{link WritableByteChannel} for writing records to an FileWriteChannel.

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 @{link RecordWriteChannel} may be obtained from the method:


Method Summary
 void closeFinally()
          Closes the file.
 int write(java.nio.ByteBuffer src, java.lang.String sequenceKey)
          Writes the data out to FileWriteChannel.
 
Methods inherited from interface java.nio.channels.WritableByteChannel
write
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Method Detail

write

int write(java.nio.ByteBuffer src,
          java.lang.String sequenceKey)
          throws java.io.IOException
Writes the data out to FileWriteChannel.

Throws:
java.io.IOException
See Also:
FileWriteChannel.write(ByteBuffer, String)

closeFinally

void closeFinally()
                  throws java.lang.IllegalStateException,
                         java.io.IOException
Closes the file.

Throws:
java.lang.IllegalStateException
java.io.IOException
See Also:
FileWriteChannel.closeFinally()