Język

IScatteringByteChannelExtensions.ReadAsync Method

Definition

Overloads

Name Description
ReadAsync(IScatteringByteChannel, ByteBuffer[])

Runs the channel's synchronous scattering read into all supplied buffers in a task.

ReadAsync(IScatteringByteChannel, ByteBuffer[], Int32, Int32)

Runs the channel's synchronous scattering read into the selected buffers in a task.

ReadAsync(IScatteringByteChannel, ByteBuffer[])

Runs the channel's synchronous scattering read into all supplied buffers in a task.

public static System.Threading.Tasks.Task<long> ReadAsync(this Java.Nio.Channels.IScatteringByteChannel self, Java.Nio.ByteBuffer[]? dsts);
static member ReadAsync : Java.Nio.Channels.IScatteringByteChannel * Java.Nio.ByteBuffer[] -> System.Threading.Tasks.Task<int64>

Parameters

self
IScatteringByteChannel

The channel from which bytes are read.

dsts
ByteBuffer[]

The destination buffers in array order. Each buffer's position advances by the bytes placed in it; buffer limits are unchanged.

Returns

A task whose result is the total number of bytes read, possibly zero, or -1 at the end of the stream. The read need not fill all buffers.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ReadAsync(IScatteringByteChannel, ByteBuffer[], Int32, Int32)

Runs the channel's synchronous scattering read into the selected buffers in a task.

public static System.Threading.Tasks.Task<long> ReadAsync(this Java.Nio.Channels.IScatteringByteChannel self, Java.Nio.ByteBuffer[]? dsts, int offset, int length);
static member ReadAsync : Java.Nio.Channels.IScatteringByteChannel * Java.Nio.ByteBuffer[] * int * int -> System.Threading.Tasks.Task<int64>

Parameters

self
IScatteringByteChannel

The channel from which bytes are read.

dsts
ByteBuffer[]

The destination buffer array. Selected buffers are filled in array order, advancing their positions without changing their limits.

offset
Int32

The index of the first destination buffer, from zero through the array length.

length
Int32

The number of destination buffers to use, from zero through the array length minus offset.

Returns

A task whose result is the total number of bytes read, possibly zero, or -1 at the end of the stream. The read need not fill all selected buffers.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to