public static byte[] asByteArray(UUID uuid) { long hi = uuid.getMostSignificantBits(); long lo = uuid.getLeastSignificantBits(); byte[] result = new byte[16]; _appendInt((int) (hi >> 32), result, 0); _appendInt((int) hi, result, 4); _appendInt((int) (lo >> 32), result, 8); _appendInt((int) lo, result, 12); return result; }
public static void toByteArray(UUID uuid, byte[] buffer, int offset) { _checkUUIDByteArray(buffer, offset); long hi = uuid.getMostSignificantBits(); long lo = uuid.getLeastSignificantBits(); _appendInt((int) (hi >> 32), buffer, offset); _appendInt((int) hi, buffer, offset+4); _appendInt((int) (lo >> 32), buffer, offset+8); _appendInt((int) lo, buffer, offset+12); }
public static byte[] asByteArray(UUID uuid) { long hi = uuid.getMostSignificantBits(); long lo = uuid.getLeastSignificantBits(); byte[] result = new byte[16]; _appendInt((int) (hi >> 32), result, 0); _appendInt((int) hi, result, 4); _appendInt((int) (lo >> 32), result, 8); _appendInt((int) lo, result, 12); return result; }
public static void toByteArray(UUID uuid, byte[] buffer, int offset) { _checkUUIDByteArray(buffer, offset); long hi = uuid.getMostSignificantBits(); long lo = uuid.getLeastSignificantBits(); _appendInt((int) (hi >> 32), buffer, offset); _appendInt((int) hi, buffer, offset+4); _appendInt((int) (lo >> 32), buffer, offset+8); _appendInt((int) lo, buffer, offset+12); }