Android Utililty Methods UUID to Byte Array Convert

List of utility methods to do UUID to Byte Array Convert

Description

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

Method

byte[]uuidToByteArray(UUID uuid)
uuid To Byte Array
long msb = uuid.getMostSignificantBits();
long lsb = uuid.getLeastSignificantBits();
byte[] buffer = new byte[16];
for (int i = 0; i < 8; i++) {
    buffer[i] = (byte) (msb >>> 8 * (7 - i));
for (int i = 8; i < 16; i++) {
    buffer[i] = (byte) (lsb >>> 8 * (7 - i));
...