- targets
- the array of byte buffers into which the bytes will be copied.
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 read 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.IO.IOException if another I/O error occurs. Java.Nio.Channels.NotYetConnectedException if this channel is not yet connected.
Reads bytes from this socket channel and stores them in the specified array of buffers. This method attempts to read as many bytes as can be stored in the buffer array from this channel and returns the number of bytes actually read.
If a read operation is in progress, subsequent threads will block until the read is completed and will then contend for the ability to read.
Calling this method is equivalent to calling read(targets, 0, targets.length);