- source
- the byte buffer containing the bytes to be written.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.AsynchronousCloseException if another thread closes the channel during the write. 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 the channel was already closed. Java.IO.IOException if another I/O error occurs. Java.Nio.Channels.NotYetConnectedException if this channel is not connected yet.
Writes bytes from the given byte buffer to this socket channel. The maximum number of bytes that are written is the remaining number of bytes in the buffer when this method is invoked. The bytes are taken from the buffer starting at the buffer's position.
The call may block if other threads are also attempting to write to the same channel.
Upon completion, the buffer's position is updated to the end of the bytes that have been written. The buffer's limit is not changed.