FileChannel.TransferFrom(IReadableByteChannel, Int64, Int64) Method

Definition

Transfers bytes into this channel's file from the given readable byte channel.

[Android.Runtime.Register("transferFrom", "(Ljava/nio/channels/ReadableByteChannel;JJ)J", "GetTransferFrom_Ljava_nio_channels_ReadableByteChannel_JJHandler")]
public abstract long TransferFrom (Java.Nio.Channels.IReadableByteChannel? src, long position, long count);
[<Android.Runtime.Register("transferFrom", "(Ljava/nio/channels/ReadableByteChannel;JJ)J", "GetTransferFrom_Ljava_nio_channels_ReadableByteChannel_JJHandler")>]
abstract member TransferFrom : Java.Nio.Channels.IReadableByteChannel * int64 * int64 -> int64

Parameters

src
IReadableByteChannel

The source channel

position
Int64

The position within the file at which the transfer is to begin; must be non-negative

count
Int64

The maximum number of bytes to be transferred; must be non-negative

Returns

Int64

The number of bytes, possibly zero, that were actually transferred

Attributes

Exceptions

if the parameters are invalid.

if the source channel is not readable.

if this channel is not writable.

if either channel has already been closed.

if either channel is closed by other threads during this operation.

if the thread is interrupted during this operation.

if any I/O error occurs.

Remarks

Java documentation for java.nio.channels.FileChannel.transferFrom(java.nio.channels.ReadableByteChannel, long, long).

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