Class ByteBufferWritableFSDataOutputStream

java.lang.Object
java.io.OutputStream
org.apache.flink.core.fs.FSDataOutputStream
org.apache.flink.state.forst.fs.ByteBufferWritableFSDataOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ByteBufferWritableFSDataOutputStream extends org.apache.flink.core.fs.FSDataOutputStream
A FSDataOutputStream delegates requests to other one and supports writing data with ByteBuffer.

All methods in this class maybe used by ForSt, please start a discussion firstly if it has to be modified.

  • Constructor Details

    • ByteBufferWritableFSDataOutputStream

      public ByteBufferWritableFSDataOutputStream(org.apache.flink.core.fs.FSDataOutputStream originalOutputStream)
  • Method Details

    • write

      public void write(ByteBuffer bb) throws IOException
      Writes ByteBuffer#remaining bytes from the ByteBuffer to this output stream. Not Thread-safe yet since the interface of write of ForSt only be accessed by one thread at a time.

      If bb is null, a NullPointerException is thrown.

      Throws:
      IOException - if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
    • getPos

      public long getPos() throws IOException
      Specified by:
      getPos in class org.apache.flink.core.fs.FSDataOutputStream
      Throws:
      IOException
    • write

      public void write(int b) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in class org.apache.flink.core.fs.FSDataOutputStream
      Throws:
      IOException
    • sync

      public void sync() throws IOException
      Specified by:
      sync in class org.apache.flink.core.fs.FSDataOutputStream
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.flink.core.fs.FSDataOutputStream
      Throws:
      IOException