ByteVector

A Vector of Byte elements (BSON's Int8Vector).

The different bytes can be extracted with toArray.

Alternatively, this class implements List.

Constructors

Link copied to clipboard
constructor(bytes: Collection<Byte>)

Constructs a ByteVector from a collection of bytes.

constructor(vararg bytes: Byte)

Constructs a ByteVector from multiple bytes.

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val padding: Byte

The number of bits in the final byte of raw that are to be ignored.

Link copied to clipboard
open override val raw: ByteArray

The raw data stored in this vector.

Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val type: Byte

The type of the elements in the vector (called dtype in the specification).

Functions

Link copied to clipboard
open operator override fun contains(element: Byte): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Byte>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Byte
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun indexOf(element: Byte): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): ByteIterator
Link copied to clipboard
open override fun lastIndexOf(element: Byte): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<Byte>
open override fun listIterator(index: Int): ListIterator<Byte>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<Byte>
Link copied to clipboard
Link copied to clipboard

Converts this Vector into a ByteArray that fits into the content of BsonType.BinaryData.

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