FileChannelAdapter

Functions

Link copied to clipboard
abstract fun close()

open fun close()
Closes an open channel.
Link copied to clipboard
open fun isOpen(): Boolean
Returns true if this channel is open.
Link copied to clipboard
open fun position(): Long
Returns the current position as a positive number of bytes from the start of the underlying data source.
open fun position(newPosition: Long): SeekableByteChannel
Sets the channel's position to newPosition.
Link copied to clipboard
open fun read(dst: ByteBuffer): Int
Reads bytes from this channel into the given buffer.
Link copied to clipboard
open fun size(): Long
Returns the size of the data source underlying this channel in bytes.
Link copied to clipboard
Truncates the data source underlying this channel to a given size.
Link copied to clipboard
open fun write(src: ByteBuffer): Int
Writes bytes from the given byte buffer to this channel.