Reader

class Reader(pagedBytes: PagedBytes) : Accountable

Provides methods to read BytesRefs from a frozen PagedBytes.

See also

.freeze

Constructors

Link copied to clipboard
constructor(pagedBytes: PagedBytes)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).

Functions

Link copied to clipboard
fun fill(b: BytesRef, start: Long)

Reads length as 1 or 2 byte vInt prefix, starting at start.

Link copied to clipboard
fun fillSlice(b: BytesRef, start: Long, length: Int)

Gets a slice out of PagedBytes starting at start with a given length. Iff the slice spans across a block border this method will allocate sufficient resources and copy the paged data.

Link copied to clipboard
fun getByte(o: Long): Byte

Get the byte at the given offset.

Link copied to clipboard
open override fun ramBytesUsed(): Long

Return the memory usage of this object in bytes. Negative values are illegal.

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