Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.files
Class RecordWriteChannelImpl

    java.lang.Object
      com.google.appengine.api.files.RecordWriteChannelImpl

All Implemented Interfaces:
  RecordWriteChannel, java.io.Closeable, java.nio.channels.Channel, java.nio.channels.WritableByteChannel

    public final class RecordWriteChannelImpl

extends java.lang.Object
implements RecordWriteChannel

An implementation of a `RecordWriteChannel`.

Constructor Summary
`RecordWriteChannelImpl(FileWriteChannel output)`

Method Summary
`void` | `close()` Closes and finalizes the `RecordWriteChannel`.
`void` | `closeFinally()` Closes the file.
`boolean` | `isOpen()`
`int` | `write(java.nio.ByteBuffer data)`
`int` | `write(java.nio.ByteBuffer data, java.lang.String sequenceKey)` Writes the data out to FileWriteChannel.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RecordWriteChannelImpl

    public RecordWriteChannelImpl(FileWriteChannel output)

Parameters:
  `output` - a `FileWriteChannel` to write the record to.

Method Detail

### write

    public int write(java.nio.ByteBuffer data)
              throws java.io.IOException

  Specified by:
    `write` in interface `java.nio.channels.WritableByteChannel`
  Throws:
    `java.io.IOException`

### isOpen

    public boolean isOpen()

  Specified by:
    `isOpen` in interface `java.nio.channels.Channel`

### write

    public int write(java.nio.ByteBuffer data,
                     java.lang.String sequenceKey)
              throws java.io.IOException

  Writes the data out to FileWriteChannel.

  Specified by:
    `write` in interface `RecordWriteChannel`
  Throws:
    `java.io.IOException`
  See Also:
    `FileWriteChannel.write(ByteBuffer, String)`

### closeFinally

    public void closeFinally()
                      throws java.lang.IllegalStateException,
                             java.io.IOException

  Closes the file.

  Specified by:
    `closeFinally` in interface `RecordWriteChannel`
  Throws:
    `java.lang.IllegalStateException`
    `java.io.IOException`
  See Also:
    `FileWriteChannel.closeFinally()`

### close

    public void close()
               throws java.io.IOException

  Closes and finalizes the `RecordWriteChannel`.

  Specified by:
    `close` in interface `java.io.Closeable`
  Specified by:
    `close` in interface `java.nio.channels.Channel`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD