ByteArrayDataAccessor

A DataAccessor implementation that reads data from a ByteArray.

Parameters

data

the source byte array from which data is read.

Constructors

Link copied to clipboard
constructor(data: ByteArray)

Properties

Link copied to clipboard
open override val size: Long

Functions

Link copied to clipboard
open override fun close()

No-op close method.

Link copied to clipboard
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.

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.

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