Język

Pipe.SinkChannel.WriteAsync Method

Definition

Overloads

Name Description
WriteAsync(ByteBuffer)

Runs a synchronous write to this pipe's sink channel in a task.

WriteAsync(ByteBuffer[])

Runs a synchronous gathering write to this pipe from all supplied buffers in a task.

WriteAsync(ByteBuffer[], Int32, Int32)

Runs a synchronous gathering write to this pipe from the selected buffers in a task.

WriteAsync(ByteBuffer)

Runs a synchronous write to this pipe's sink channel in a task.

public System.Threading.Tasks.Task<int> WriteAsync(Java.Nio.ByteBuffer? src);
member this.WriteAsync : Java.Nio.ByteBuffer -> System.Threading.Tasks.Task<int>

Parameters

src
ByteBuffer

The source buffer. Its position advances by the number of bytes written; its limit is unchanged.

Returns

A task whose result is the number of bytes written, possibly zero. The write need not consume all remaining bytes in non-blocking mode.

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

WriteAsync(ByteBuffer[])

Runs a synchronous gathering write to this pipe from all supplied buffers in a task.

public System.Threading.Tasks.Task<long> WriteAsync(Java.Nio.ByteBuffer[]? srcs);
member this.WriteAsync : Java.Nio.ByteBuffer[] -> System.Threading.Tasks.Task<int64>

Parameters

srcs
ByteBuffer[]

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

Returns

A task whose result is the total number of bytes written, possibly zero. The write need not consume all remaining bytes in non-blocking mode.

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

WriteAsync(ByteBuffer[], Int32, Int32)

Runs a synchronous gathering write to this pipe from the selected buffers in a task.

public System.Threading.Tasks.Task<long> WriteAsync(Java.Nio.ByteBuffer[]? srcs, int offset, int length);
member this.WriteAsync : Java.Nio.ByteBuffer[] * int * int -> System.Threading.Tasks.Task<int64>

Parameters

srcs
ByteBuffer[]

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

offset
Int32

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

length
Int32

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

Returns

A task whose result is the total number of bytes written, possibly zero. The write need not consume all selected buffers' remaining bytes in non-blocking mode.

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