- buffer
- the buffer to receive the bytes.
- position
- the (non-negative) position at which to read the bytes.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.AsynchronousCloseException if this channel is closed by another thread while this method is executing. Java.Nio.Channels.ClosedByInterruptException if another thread interrupts the calling thread while this operation is in progress. The calling thread will have the interrupt state set, and the channel will be closed. Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.Lang.IllegalArgumentException if position is less than 0. Java.IO.IOException if another I/O error occurs. 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 starting from the specified file position.
The bytes are read starting at the given file position (up to the remaining number of bytes in the buffer). The number of bytes actually read is returned.
If position is beyond the current end of file, then no bytes are read.
Note that the file position is unmodified by this method.