- buffer
- the byte buffer containing the bytes to be written.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.NonWritableChannelException if the channel was not opened for writing. Java.Nio.Channels.ClosedChannelException if the channel was already closed. Java.Nio.Channels.AsynchronousCloseException if another thread closes the channel during the write. Java.Nio.Channels.ClosedByInterruptException if another thread interrupt the calling thread during the write. Java.IO.IOException another IO exception occurs, details are in the message.
Writes bytes from the given buffer to the channel.
The maximum number of bytes that will be written is the remaining() number of bytes in the buffer when the method invoked. The bytes will be written from the buffer starting at the buffer's position.
The call may block if other threads are also attempting to write on the same channel.
Upon completion, the buffer's position() is updated to the end of the bytes that were written. The buffer's limit() is unmodified.