toBytes

Returns a new byte array, copied from the given buf,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.
The position and the other index parameters are not changed.

toStringBinary

Converts the given byte buffer to a printable representation,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.
The position and the other index parameters are not changed.

putAsShort

public static int putAsShort(byte[] bytes,
int offset,
int val)

Put an int value as short out to the specified byte array position. Only the lower 2 bytes of
the short will be put into the array. The caller of the API need to make sure they will not
loose the value by doing so. This is useful to store an unsigned short which is represented as
int in other parts.

inclusive - Whether the end of range is prefix-inclusive or is
considered an exclusive boundary. Automatic splits are generally exclusive
and manual splits with an explicit range utilize an inclusive end of range.

num - Number of times to split range. Pass 1 if you want to split
the range in two; i.e. one split.

zero-based index of the key, if the key is present in the array.
Otherwise, a value -(i + 1) such that the key is between arr[i -
1] and arr[i] non-inclusively, where i is in [0, i], if we define
arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above
means that this function can return 2N + 1 different values
ranging from -(N + 1) to N - 1.

zero-based index of the key, if the key is present in the array.
Otherwise, a value -(i + 1) such that the key is between arr[i -
1] and arr[i] non-inclusively, where i is in [0, i], if we define
arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above
means that this function can return 2N + 1 different values
ranging from -(N + 1) to N - 1.

incrementBytes

public static byte[] incrementBytes(byte[] value,
long amount)

Bytewise binary increment/deincrement of long contained in byte array
on given amount.