ScatteringByteChannelpublic interface ScatteringByteChannel implements ReadableByteChannelThe interface for channels that can read data into a set of buffers in a
single operation. The corresponding interface for writes is
{@link GatheringByteChannel}. |
Methods Summary |
---|
public long | read(java.nio.ByteBuffer[] buffers)Reads bytes from this channel into the specified array of buffers.
This method is equivalent to {@code read(buffers, 0, buffers.length);}
| public long | read(java.nio.ByteBuffer[] buffers, int offset, int length)Reads bytes from this channel and stores them in a subset of the
specified array of buffers. The subset is defined by {@code offset} and
{@code length}, indicating the first buffer and the number of buffers to
use. This method attempts to read as many bytes as can be stored in the
buffer subset from the channel and returns the number of bytes actually
read.
If a read operation is in progress, subsequent threads will block until
the read is completed and will then contend for the ability to read.
|
|