java.nio.channels

Interface GatheringByteChannel

public interface GatheringByteChannel extends WritableByteChannel

Method Summary
longwrite(ByteBuffer[] srcs, int offset, int length)
Writes a sequence of bytes to this channel from a subsequence of the given buffers
longwrite(ByteBuffer[] srcs)
Writes a sequence of bytes to this channel from the given buffers

Method Detail

write

public long write(ByteBuffer[] srcs, int offset, int length)
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

public long write(ByteBuffer[] srcs)
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