ForByteArray

io.bullet.borer.ByteAccess.ForByteArray
object ForByteArray extends ByteAccess[Array[Byte]]

The default ByteAccess for plain byte arrays.

Attributes

Graph
Supertypes
trait ByteAccess[Array[Byte]]
class Object
trait Matchable
class Any
Self type

Members list

Type members

Types

type Out = ToByteArray

Value members

Concrete methods

def concat(a: Array[Byte], b: Array[Byte]): Array[Byte]

Returns the concatenation of a and b.

Returns the concatenation of a and b.

Attributes

def convert[B](value: B)(implicit byteAccess: ByteAccess[B]): Array[Byte]

Converts the given value of type B into a Bytes instance.

Converts the given value of type B into a Bytes instance.

Attributes

def copyToByteArray(bytes: Array[Byte], byteArray: Array[Byte], startIndex: Int): Array[Byte]

Copies the given Bytes instance into the given byteArray starting at the given index. Returns a Bytes instance holding all bytes that could not be written to the byte array due to capacity constraints or an empty Bytes instance, if the given byte array was large enough to hold all bytes.

Copies the given Bytes instance into the given byteArray starting at the given index. Returns a Bytes instance holding all bytes that could not be written to the byte array due to capacity constraints or an empty Bytes instance, if the given byte array was large enough to hold all bytes.

Attributes

def copyToByteBuffer(bytes: Array[Byte], byteBuffer: ByteBuffer): Array[Byte]

Copies the given Bytes instance into the given byteBuffer. Returns a Bytes instance holding all bytes that could not be written to the byteBuffer due to capacity constraints or an empty Bytes instance, if the given byteBuffer was large enough to hold all bytes.

Copies the given Bytes instance into the given byteBuffer. Returns a Bytes instance holding all bytes that could not be written to the byteBuffer due to capacity constraints or an empty Bytes instance, if the given byteBuffer was large enough to hold all bytes.

Attributes

def empty: Array[Byte]

Returns an empty Bytes instance.

Returns an empty Bytes instance.

Attributes

def fromByteArray(byteArray: Array[Byte]): Array[Byte]

Converts the given byte array into a Bytes instance.

Converts the given byte array into a Bytes instance.

Attributes

def isEmpty(bytes: Array[Byte]): Boolean

Returns true iff the given Bytes instance is empty.

Returns true iff the given Bytes instance is empty.

Attributes

def sizeOf(bytes: Array[Byte]): Long

Returns the number of bytes contained in the given Bytes instance.

Returns the number of bytes contained in the given Bytes instance.

Attributes

def toByteArray(bytes: Array[Byte]): Array[Byte]

Converts the given Bytes instance into a byte array.

Converts the given Bytes instance into a byte array.

Attributes