Top Description Fields Constructors Methods
org.h2.util

public final Class Bits

extends Object
Class Inheritance
Imports
java.lang.invoke.MethodHandles, .VarHandle, java.nio.ByteOrder, java.util.UUID

Manipulations with bytes and arrays. Specialized implementation for Java 9 and later versions.

Field Summary

Modifier and TypeField and Description
public static final VarHandle
DOUBLE_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on big-endian system.

public static final VarHandle
DOUBLE_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on little-endian system.

public static final VarHandle
INT_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a int[] array on big-endian system.

public static final VarHandle
INT_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a int[] array on little-endian system.

public static final VarHandle
LONG_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on big-endian system.

public static final VarHandle
LONG_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on little-endian system.

Constructor Summary

AccessConstructor and Description
private
Bits()

Method Summary

Modifier and TypeMethod and Description
public static byte[]

Returns:

byte array representation
uuidToBytes
(long
most significant part of UUID
msb
,
long
least significant part of UUID
lsb
)

Converts UUID value to byte array in big-endian order.

public static byte[]

Returns:

byte array representation
uuidToBytes
(UUID
UUID value
uuid
)

Converts UUID value to byte array in big-endian order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DOUBLE_VH_BEback to summary
public static final VarHandle DOUBLE_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on big-endian system.

DOUBLE_VH_LEback to summary
public static final VarHandle DOUBLE_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on little-endian system.

INT_VH_BEback to summary
public static final VarHandle INT_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a int[] array on big-endian system.

INT_VH_LEback to summary
public static final VarHandle INT_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a int[] array on little-endian system.

LONG_VH_BEback to summary
public static final VarHandle LONG_VH_BE

VarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on big-endian system.

LONG_VH_LEback to summary
public static final VarHandle LONG_VH_LE

VarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on little-endian system.

Constructor Detail

Bitsback to summary
private Bits()

Method Detail

uuidToBytesback to summary
public static byte[] uuidToBytes(long msb, long lsb)

Converts UUID value to byte array in big-endian order.

Parameters
msb:long

most significant part of UUID

lsb:long

least significant part of UUID

Returns:byte[]

byte array representation

uuidToBytesback to summary
public static byte[] uuidToBytes(UUID uuid)

Converts UUID value to byte array in big-endian order.

Parameters
uuid:UUID

UUID value

Returns:byte[]

byte array representation