DataAccessor

Defines an interface for random access data reading. Implementations should provide methods to read bytes from a data source.

Inheritors

Properties

Link copied to clipboard
abstract val size: Long

Functions

Link copied to clipboard
expect abstract fun close()
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.

abstract 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.