Class BufferReaderWriterUtil

java.lang.Object
org.apache.flink.runtime.io.network.partition.BufferReaderWriterUtil

public final class BufferReaderWriterUtil extends Object
Putting and getting of a sequence of buffers to/from a FileChannel or a ByteBuffer. This class handles the headers, length encoding, memory slicing.

The encoding is the same across FileChannel and ByteBuffer, so this class can write to a file and read from the byte buffer that results from mapping this file to memory.