Module java.base

Interface ScatteringByteChannel

All Superinterfaces:
AutoCloseable, Channel, Closeable, ReadableByteChannel
All Known Implementing Classes:
DatagramChannel, FileChannel, Pipe.SourceChannel, SocketChannel

public interface ScatteringByteChannel extends ReadableByteChannel
A channel that can read bytes into a sequence of buffers.

A scattering read operation reads, in a single invocation, a sequence of bytes into one or more of a given sequence of buffers. Scattering reads are often useful when implementing network protocols or file formats that, for example, group data into segments consisting of one or more fixed-length headers followed by a variable-length body. Similar gathering write operations are defined in the GatheringByteChannel interface.

Since:
1.4