Package org.h2.util

# Class Bits

java.lang.Object
org.h2.util.Bits

public final class Bits extends Object
Manipulations with bytes and arrays. Specialized implementation for Java 9 and later versions.

## Field Summary

Fields
Modifier and Type
Field
Description
`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.
`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.
`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.
`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.
`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.
`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.

## Method Summary

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(UUID uuid)`
Converts UUID value to byte array in big-endian order.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### INT_VH_BE

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_LE

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_BE

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_LE

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.

### DOUBLE_VH_BE

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_LE

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.

## Method Details

### 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 UUID
  `lsb` - least significant part of UUID
Returns:
  byte array representation

### uuidToBytes

public static byte[] uuidToBytes(UUID uuid)
Converts UUID value to byte array in big-endian order.

Parameters:
  `uuid` - UUID value
Returns:
  byte array representation