Class ByteBufferWritableFSDataOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    @Experimental
    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 Detail

      • ByteBufferWritableFSDataOutputStream

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

      • 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
      • 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