Java.Nio.Channels.FileChannel.TransferTo Method
Reads up to count bytes from this channel's file starting at position and writes them to target.

Syntax

[Android.Runtime.Register("transferTo", "(JJLjava/nio/channels/WritableByteChannel;)J", "GetTransferTo_JJLjava_nio_channels_WritableByteChannel_Handler")]
public abstract long TransferTo (long position, long count, IWritableByteChannel target)

Parameters

position
the non-negative position to begin.
count
the non-negative number of bytes to transfer.
target
the target channel to write to.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the parameters are invalid.
Java.Nio.Channels.NonReadableChannelExceptionif this channel is not readable.
Java.Nio.Channels.NonWritableChannelExceptionif the target 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 this channel's file starting at position and writes them to target. No bytes are transferred if position is larger than the size of this channel's file. Less than count bytes are transferred if there less bytes available from this channel's file or if the target channel is non-blocking and has less than count bytes free in its input 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