Java.Nio.Channels.IScatteringByteChannel.Read Method
Attempts to read all remaining() bytes from length byte buffers, in order, starting at buffers[offset].

Syntax

[Android.Runtime.Register("read", "([Ljava/nio/ByteBuffer;II)J", "GetRead_arrayLjava_nio_ByteBuffer_IIHandler:Java.Nio.Channels.IScatteringByteChannelInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public long Read (Java.Nio.ByteBuffer[] buffers, int offset, int length)

Parameters

buffers
the array of byte buffers into which the bytes will be copied.
offset
the index of the first buffer to store bytes in.
length
the maximum number of buffers to store bytes in.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.AsynchronousCloseExceptionif the channel is closed by another thread during this read operation.
Java.Nio.Channels.ClosedByInterruptExceptionif another thread interrupts the calling thread while the operation is in progress. The interrupt state of the calling thread is set and the channel is closed.
Java.Nio.Channels.ClosedChannelExceptionif the channel is closed.
Java.Lang.IndexOutOfBoundsExceptionif offset or length , or if offset + length is greater than the size of buffers.
Java.IO.IOExceptionif another I/O error occurs; details are in the message.
Java.Nio.Channels.NonWritableChannelExceptionif the channel has not been opened in a mode that permits reading.

Remarks

Attempts to read all remaining() bytes from length byte buffers, in order, starting at buffers[offset]. The number of bytes actually read is returned.

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.

[Android Documentation]

Requirements

Namespace: Java.Nio.Channels
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1