Here you can find the source of uuidFromBytes(byte[] b)
public static UUID uuidFromBytes(byte[] b)
//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 UUID uuidFromBytes(byte[] b) { if (b.length < 16) { throw new IllegalArgumentException("uuid needs at least 16 bytes"); }/*from w w w. ja v a 2 s .co m*/ ByteBuffer bb = ByteBuffer.wrap(b); bb.flip(); bb.order(ByteOrder.BIG_ENDIAN); return new UUID(bb.getLong(), bb.getLong()); } }