Here you can find the source of uuidToBytes(UUID id)
public static byte[] uuidToBytes(UUID id)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.UUID; public class Main { public static byte[] uuidToBytes(UUID id) { byte[] b = new byte[16]; return ByteBuffer.wrap(b).order(ByteOrder.BIG_ENDIAN).putLong(id.getMostSignificantBits()) .putLong(id.getLeastSignificantBits()).array(); }//from www. ja v a 2s. com }