Java.Nio.Channels.FileChannel.Write Method
Writes bytes from the given byte buffer to this file channel.

Syntax

[Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;)I", "GetWrite_Ljava_nio_ByteBuffer_Handler")]
public abstract int Write (Java.Nio.ByteBuffer src)

See Also

IWritableByteChannel.Write(Java.Nio.ByteBuffer)

Parameters

src
the byte buffer containing the bytes to be written.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.NonWritableChannelExceptionif the channel was not opened for writing.
Java.Nio.Channels.ClosedChannelExceptionif the channel was already closed.
Java.Nio.Channels.AsynchronousCloseExceptionif another thread closes the channel during the write.
Java.Nio.Channels.ClosedByInterruptExceptionif another thread interrupts the calling thread while this operation is in progress. The interrupt state of the calling thread is set and the channel is closed.
Java.IO.IOExceptionif another I/O error occurs, details are in the message.

Remarks

Writes bytes from the given byte buffer to this file channel.

The bytes are written starting at the current file position, and after some number of bytes are written (up to the remaining number of bytes in the buffer) the file position is increased by the number of bytes actually written.

[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