FloatArraySchema

Encodes a FloatArray as an array of DOUBLE, widening each element.

The format has no float type. Widening is exact, but the encoded array is twice the size of the input.

Properties

Link copied to clipboard
Link copied to clipboard
open override val schema: ByteArray

The schema definition as bytes, which the writer puts in the log.

Link copied to clipboard
open override val schemaSize: Int

Number of bytes in this schema's definition.

Link copied to clipboard
open override val tag: Int

The integer that identifies this schema's type in the log.

Functions

Link copied to clipboard
open override fun encodeObject(buffer: ByteBuffer, obj: FloatArray)

Writes the given object into the buffer.

Link copied to clipboard
open fun encodeSchema(buffer: ByteBuffer)

Writes the whole schema definition, starting with the tag, into the buffer.

Link copied to clipboard
override fun objSize(obj: FloatArray): Int

Returns the number of bytes encodeObject writes for the given object.