Here you can find the source of toUuid(byte[] bytes)
public static UUID toUuid(byte[] bytes)
//package com.java2s; import java.nio.ByteBuffer; import java.util.UUID; public class Main { public static UUID toUuid(byte[] bytes) { ByteBuffer bb = ByteBuffer.wrap(bytes); long hi = bb.getLong(); long lo = bb.getLong(); return new UUID(hi, lo); }/*from w w w. j a v a 2s . c om*/ }