Java.Nio.Channels.FileChannel.TransferFrom Method
Reads up to count bytes from src and stores them in this channel's file starting at position.

Syntax

[Android.Runtime.Register("transferFrom", "(Ljava/nio/channels/ReadableByteChannel;JJ)J", "GetTransferFrom_Ljava_nio_channels_ReadableByteChannel_JJHandler")]
public abstract long TransferFrom (IReadableByteChannel src, long position, long count)

Parameters

src
the source channel to read bytes from.
position
the non-negative start position.
count
the non-negative number of bytes to transfer.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the parameters are invalid.
Java.Nio.Channels.NonReadableChannelExceptionif the source channel is not readable.
Java.Nio.Channels.NonWritableChannelExceptionif this channel is not writable.
Java.Nio.Channels.ClosedChannelExceptionif either channel has already been closed.
Java.Nio.Channels.AsynchronousCloseExceptionif either channel is closed by other threads during this operation.
Java.Nio.Channels.ClosedByInterruptExceptionif the thread is interrupted during this operation.
Java.IO.IOExceptionif any I/O error occurs.

Remarks

Reads up to count bytes from src and stores them in this channel's file starting at position. No bytes are transferred if position is larger than the size of this channel's file. Less than count bytes are transferred if there are less bytes remaining in the source channel or if the source channel is non-blocking and has less than count bytes immediately available in its output buffer.

Note that this channel's position is not modified.

[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