Package org.h2.util
Class Bits
- java.lang.Object
-
- org.h2.util.Bits
-
public final class Bits extends java.lang.ObjectManipulations with bytes and arrays. Specialized implementation for Java 9 and later versions.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.invoke.VarHandleDOUBLE_VH_BEVarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on big-endian system.static java.lang.invoke.VarHandleDOUBLE_VH_LEVarHandle giving access to elements of a byte[] array viewed as if it were a double[] array on little-endian system.static java.lang.invoke.VarHandleINT_VH_BEVarHandle giving access to elements of a byte[] array viewed as if it were an int[] array on big-endian system.static java.lang.invoke.VarHandleINT_VH_LEVarHandle giving access to elements of a byte[] array viewed as if it were an int[] array on little-endian system.static java.lang.invoke.VarHandleLONG_VH_BEVarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on big-endian system.static java.lang.invoke.VarHandleLONG_VH_LEVarHandle giving access to elements of a byte[] array viewed as if it were a long[] array on little-endian system.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]uuidToBytes(long msb, long lsb)Converts UUID value to byte array in big-endian order.static byte[]uuidToBytes(java.util.UUID uuid)Converts UUID value to byte array in big-endian order.
-
-
-
Field Detail
-
INT_VH_BE
public static final java.lang.invoke.VarHandle INT_VH_BE
VarHandle giving access to elements of a byte[] array viewed as if it were an int[] array on big-endian system.
-
INT_VH_LE
public static final java.lang.invoke.VarHandle INT_VH_LE
VarHandle giving access to elements of a byte[] array viewed as if it were an int[] array on little-endian system.
-
LONG_VH_BE
public static final java.lang.invoke.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_LE
public static final java.lang.invoke.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.
-
DOUBLE_VH_BE
public static final java.lang.invoke.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_LE
public static final java.lang.invoke.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.
-
-
Method Detail
-
uuidToBytes
public static byte[] uuidToBytes(long msb, long lsb)Converts UUID value to byte array in big-endian order.- Parameters:
msb- most significant part of UUIDlsb- least significant part of UUID- Returns:
- byte array representation
-
uuidToBytes
public static byte[] uuidToBytes(java.util.UUID uuid)
Converts UUID value to byte array in big-endian order.- Parameters:
uuid- UUID value- Returns:
- byte array representation
-
-