public final FileChannel getChannel ()

Returns the unique FileChannel object associated with this file.

The java.nio.channels.FileChannel.position() of the returned channel will always be equal to this object's file-pointer offset as returned by the 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.

Returns:  the file channel associated with this file

Since:  1.4

@spec JSR-51