BufferedChecksumIndexInput

Simple implementation of ChecksumIndexInput that wraps another input and delegates calls.

Constructors

Link copied to clipboard
constructor(main: IndexInput)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val checksum: Long
Link copied to clipboard
Link copied to clipboard
open override val filePointer: Long

Returns the current position in this file, where the next read will occur.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun clone(): IndexInput

{@inheritDoc}

Link copied to clipboard
open override fun close()

Closes the stream to further operations.

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

The number of bytes in the file.

Link copied to clipboard
open fun prefetch(offset: Long, length: Long)

Optional method: Give a hint to this input that some bytes will be read in the near future. IndexInput implementations may take advantage of this hint to start fetching pages of data immediately from storage.

Link copied to clipboard

Creates a random-access slice of this index input, with the given offset and length.

Link copied to clipboard
open override fun readByte(): Byte

Reads and returns a single byte.

Link copied to clipboard
open override fun readBytes(b: ByteArray, offset: Int, len: Int)

Reads a specified number of bytes into an array at the specified offset.

open fun readBytes(b: ByteArray, offset: Int, len: Int, useBuffer: Boolean)

Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

Link copied to clipboard
open fun readFloats(floats: FloatArray, offset: Int, len: Int)

Reads a specified number of floats into an array at the specified offset.

Link copied to clipboard
open fun readGroupVInt(dst: IntArray, offset: Int)

Override if you have an efficient implementation. In general this is when the input supports random access.

Link copied to clipboard
open override fun readInt(): Int

Reads four bytes and returns an int (LE byte order).

Link copied to clipboard
open fun readInts(dst: IntArray, offset: Int, length: Int)

Reads a specified number of ints into an array at the specified offset.

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

Reads eight bytes and returns a long (LE byte order).

Link copied to clipboard
open override fun readLongs(dst: LongArray, offset: Int, length: Int)

Read a specified number of longs.

Link copied to clipboard

Reads a Map previously written with .

Link copied to clipboard

Reads a Set previously written with DataOutput.writeSetOfStrings.

Link copied to clipboard
open override fun readShort(): Short

Reads two bytes and returns a short (LE byte order).

Link copied to clipboard
open fun readString(): String

Reads a string.

Link copied to clipboard
open fun readVInt(): Int

Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are supported, but should be avoided.

Link copied to clipboard
open fun readVLong(): Long

Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Link copied to clipboard
open fun readZInt(): Int

Read a zig-zag-encoded .readVInt integer.

Link copied to clipboard
open fun readZLong(): Long

Read a zig-zag-encoded .readVLong integer. Reads between one and ten bytes.

Link copied to clipboard
open override fun seek(pos: Long)

{@inheritDoc}

Link copied to clipboard
open override fun skipBytes(numBytes: Long)

{@inheritDoc}

Link copied to clipboard
open override fun slice(sliceDescription: String, offset: Long, length: Long): IndexInput

Creates a slice of this index input, with the given description, offset, and length. The slice is sought to the beginning.

open fun slice(sliceDescription: String, offset: Long, length: Long, readAdvice: ReadAdvice): IndexInput

Create a slice with a specific ReadAdvice. This is typically used by [ ] implementations to honor the ReadAdvice of each file within the compound file.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun updateReadAdvice(readAdvice: ReadAdvice?)

Optional method: Give a hint to this input about the change in read access pattern. IndexInput implementations may take advantage of this hint to optimize reads from storage.