- sources
- the array of byte buffers that is the source for bytes written to this channel.
- offset
- the index of the first buffer in buffers to get bytes from.
- length
- the number of buffers to get bytes from.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.AsynchronousCloseException if this channel is closed by another thread during this write operation. Java.Nio.Channels.ClosedByInterruptException if another thread interrupts the calling thread while this operation is in progress. The interrupt state of the calling thread is set and the channel is closed. Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.Lang.IndexOutOfBoundsException if offset or length , or if offset + length is greater than the size of sources. Java.IO.IOException if another I/O error occurs. Java.Nio.Channels.NotYetConnectedException if this channel is not yet connected.
Attempts to write a subset of the given bytes from the buffers to this socket channel. This method attempts to write all remaining() bytes from length byte buffers, in order, starting at sources[offset]. The number of bytes actually written is returned.
If a write operation is in progress, subsequent threads will block until the write is completed and then contend for the ability to write.