- buffer
- the byte buffer to receive the bytes.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.AsynchronousCloseException if another thread closes the channel during the read. Java.Nio.Channels.ClosedByInterruptException if another thread interrupts the calling thread during the read. Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.IO.IOException if another I/O error occurs, details are in the message. Java.Nio.Channels.NonReadableChannelException if the channel has not been opened in a mode that permits reading.
Reads bytes from this file channel into the given buffer.
The maximum number of bytes that will be read is the remaining number of bytes in the buffer when the method is invoked. The bytes will be copied into the buffer starting at the buffer's current position.
The call may block if other threads are also attempting to read from this channel.
Upon completion, the buffer's position is set to the end of the bytes that have been read. The buffer's limit is not changed.