java.nio.channels
Interface ScatteringByteChannel

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

public interface ScatteringByteChannel
extends ReadableByteChannel


Method Summary
 long read(ByteBuffer[] srcs)
          Reads a sequence of bytes from this channel into the given buffers
 long read(ByteBuffer[] srcs, int offset, int length)
          Reads a sequence of bytes from this channel into a subsequence of the given buffers
 
Methods inherited from interface java.nio.channels.ReadableByteChannel
read
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Method Detail

read

long read(ByteBuffer[] srcs,
          int offset,
          int length)
          throws IOException
Reads a sequence of bytes from this channel into a subsequence of the given buffers

Throws:
AsynchronousCloseException - If another thread closes this channel while the write operation is in progress
ClosedByInterruptException - If another thread interrupts the current thread while the write operation is in progress, thereby closing the channel and setting the current thread's interrupt status
ClosedChannelException - If this channel is closed
IndexOutOfBoundsException - If the preconditions on the offset and length parameters do not hold
IOException - If an error occurs
NonReadableChannelException - If this channel was not opened for reading

read

long read(ByteBuffer[] srcs)
          throws IOException
Reads a sequence of bytes from this channel into the given buffers

Throws:
AsynchronousCloseException - If another thread closes this channel while the write operation is in progress
ClosedByInterruptException - If another thread interrupts the current thread while the write operation is in progress, thereby closing the channel and setting the current thread's interrupt status
ClosedChannelException - If this channel is closed
IOException - If an error occurs
NonReadableChannelException - If this channel was not opened for reading