Package org.apache.flink.core.memory
Class DataOutputViewStreamWrapper
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.DataOutputStream
-
- org.apache.flink.core.memory.DataOutputViewStreamWrapper
-
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable,DataOutputView
@PublicEvolving public class DataOutputViewStreamWrapper extends DataOutputStream implements DataOutputView
Utility class that turns anOutputStreaminto aDataOutputView.
-
-
Field Summary
-
Fields inherited from class java.io.DataOutputStream
written
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description DataOutputViewStreamWrapper(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidskipBytesToWrite(int numBytes)SkipsnumBytesbytes memory.voidwrite(DataInputView source, int numBytes)CopiesnumBytesbytes from the source to this view.-
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.io.FilterOutputStream
close, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Constructor Detail
-
DataOutputViewStreamWrapper
public DataOutputViewStreamWrapper(OutputStream out)
-
-
Method Detail
-
skipBytesToWrite
public void skipBytesToWrite(int numBytes) throws IOExceptionDescription copied from interface:DataOutputViewSkipsnumBytesbytes memory. If some program reads the memory that was skipped over, the results are undefined.- Specified by:
skipBytesToWritein interfaceDataOutputView- Parameters:
numBytes- The number of bytes to skip.- Throws:
IOException- Thrown, if any I/O related problem occurred such that the view could not be advanced to the desired position.
-
write
public void write(DataInputView source, int numBytes) throws IOException
Description copied from interface:DataOutputViewCopiesnumBytesbytes from the source to this view.- Specified by:
writein interfaceDataOutputView- Parameters:
source- The source to copy the bytes from.numBytes- The number of bytes to copy.- Throws:
IOException- Thrown, if any I/O related problem occurred, such that either the input view could not be read, or the output could not be written.
-
-