Java Utililty Methods Byte Array Value Set

List of utility methods to do Byte Array Value Set

Description

The list of methods to do Byte Array Value Set are organized into topic(s).

Method

voidsetBytes(short value, int offset, byte[] bytes)
set Bytes
bytes[offset] = getByte0B(value);
bytes[++offset] = getByte1B(value);
voidsetBytesFromInt(byte[] ret, int value, int offs)
set Bytes From Int
int v = value;
int j = offs;
ret[j++] = (byte) ((v >>> 24) & 0xFF);
ret[j++] = (byte) ((v >>> 16) & 0xFF);
ret[j++] = (byte) ((v >>> 8) & 0xFF);
ret[j++] = (byte) ((v >>> 0) & 0xFF);
voidsetBytesFromLong(byte[] ret, long value, int offs)
set Bytes From Long
long v = value;
int j = offs;
ret[j++] = (byte) ((v >>> 56) & 0xFF);
ret[j++] = (byte) ((v >>> 48) & 0xFF);
ret[j++] = (byte) ((v >>> 40) & 0xFF);
ret[j++] = (byte) ((v >>> 32) & 0xFF);
ret[j++] = (byte) ((v >>> 24) & 0xFF);
ret[j++] = (byte) ((v >>> 16) & 0xFF);
...