java.nio.channels
Interface GatheringByteChannel
- All Superinterfaces:
- Channel, Closeable, WritableByteChannel
- All Known Implementing Classes:
- DatagramChannel, FileChannel, Pipe.SinkChannel, SocketChannel
public interface GatheringByteChannel
- extends WritableByteChannel
|
Method Summary |
long |
write(ByteBuffer[] srcs)
Writes a sequence of bytes to this channel from the given buffers |
long |
write(ByteBuffer[] srcs,
int offset,
int length)
Writes a sequence of bytes to this channel from a subsequence of
the given buffers |
write
long write(ByteBuffer[] srcs,
int offset,
int length)
throws IOException
- Writes a sequence of bytes to this channel from 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
NonWritableChannelException - If this channel was not opened for
writing
write
long write(ByteBuffer[] srcs)
throws IOException
- Writes a sequence of bytes to this channel from 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
NonWritableChannelException - If this channel was not opened for
writing