Partager via


FileOutputStream.Channel Property

Definition

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

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

Property Value

the file channel associated with this file output stream

Attributes

Remarks

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

The initial java.nio.channels.FileChannel#position() position of the returned channel will be equal to the number of bytes written to the file so far unless this stream is in append mode, in which case it will be equal to the size of the file. Writing bytes to this stream will increment the channel's position accordingly. Changing the channel's position, either explicitly or by writing, will change this stream's file position.

Added in 1.4.

Java documentation for java.io.FileOutputStream.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