Package org.apache.flink.state.forst.fs
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
@Experimental public class ByteBufferWritableFSDataOutputStream extends org.apache.flink.core.fs.FSDataOutputStreamAFSDataOutputStreamdelegates requests to other one and supports writing data withByteBuffer.All methods in this class maybe used by ForSt, please start a discussion firstly if it has to be modified.
-
-
Constructor Summary
Constructors Constructor Description ByteBufferWritableFSDataOutputStream(org.apache.flink.core.fs.FSDataOutputStream originalOutputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()longgetPos()voidsync()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)voidwrite(ByteBuffer bb)WritesByteBuffer#remainingbytes from the ByteBuffer to this output stream.-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
write
public void write(ByteBuffer bb) throws IOException
WritesByteBuffer#remainingbytes 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
bbisnull, aNullPointerExceptionis thrown.- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionis thrown if the output stream is closed.
-
getPos
public long getPos() throws IOException- Specified by:
getPosin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
sync
public void sync() throws IOException- Specified by:
syncin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
-