RandomAccessFile.Channel Property

Definition

Returns the unique java.nio.channels.FileChannel FileChannel object associated with this file.

public Java.Nio.Channels.FileChannel? Channel { [Android.Runtime.Register("getChannel", "()Ljava/nio/channels/FileChannel;", "")] get; }
[<get: Android.Runtime.Register("getChannel", "()Ljava/nio/channels/FileChannel;", "")>]
member this.Channel : Java.Nio.Channels.FileChannel

Property Value

the file channel associated with this file

Attributes

Remarks

Returns the unique java.nio.channels.FileChannel FileChannel object associated with this file.

The java.nio.channels.FileChannel#position() position of the returned channel will always be equal to this object's file-pointer offset as returned by the #getFilePointer getFilePointer method. Changing this object's file-pointer offset, whether explicitly or by reading or writing bytes, will change the position of the channel, and vice versa. Changing the file's length via this object will change the length seen via the file channel, and vice versa.

Added in 1.4.

Java documentation for java.io.RandomAccessFile.getChannel().

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