Język

FileChannel.TransferFromAsync(IReadableByteChannel, Int64, Int64) Method

Definition

Runs a synchronous transfer from the source channel into this file in a task without changing this channel's current file position.

public System.Threading.Tasks.Task<long> TransferFromAsync(Java.Nio.Channels.IReadableByteChannel? src, long position, long count);
member this.TransferFromAsync : Java.Nio.Channels.IReadableByteChannel * int64 * int64 -> System.Threading.Tasks.Task<int64>

Parameters

src
IReadableByteChannel

The channel from which bytes are read. If it has a position, that position advances by the number of bytes read.

position
Int64

The non-negative byte offset in this file at which to start writing. No bytes are transferred if this offset exceeds the current file size.

count
Int64

The maximum number of bytes to transfer. Must be non-negative.

Returns

A task whose result is the number of bytes transferred, possibly zero and possibly less than count.

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