SeekableByteChannelDataAccessor

A DataAccessor implementation that reads data from a SeekableByteChannel.

Parameters

channel

the channel to read from

See also

Constructors

Link copied to clipboard
constructor(channel: SeekableByteChannel)

Properties

Link copied to clipboard
open override val size: Long

Functions

Link copied to clipboard
open override fun close()

Close the data accessor, it will close the underlying channel.

Link copied to clipboard
open fun readAtMost(pos: Long, buf: ByteArray): Int

Reads at most buf.size bytes from the file at the specified pos into the buf array.

open override fun readAtMost(pos: Long, buf: ByteArray, off: Int, len: Int): Int

Reads at most len bytes from the file at the specified pos into the buf array.

Link copied to clipboard
open fun readFully(pos: Long, buf: ByteArray)

open fun readFully(pos: Long, buf: ByteArray, off: Int, len: Int)

Reads exactly len bytes from the file at the specified pos into the buf array.

Link copied to clipboard
open override fun toString(): String