Java UUID from UUIDFromBytes(byte[] array)

Here you can find the source of UUIDFromBytes(byte[] array)

Description

UUID From Bytes

License

Open Source License

Declaration

public static UUID UUIDFromBytes(byte[] array) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;
import java.util.UUID;

public class Main {
    public static UUID UUIDFromBytes(byte[] array) {
        if (array == null)
            return null;
        ByteBuffer buf = ByteBuffer.wrap(array);
        return new UUID(buf.getLong(), buf.getLong());
    }//from   ww  w  .  j av  a 2 s. c  om
}

Related

  1. uuidFromBytes(byte[] b)
  2. uuidFromBytes(byte[] bytes)
  3. uuidFromMsftBinary(byte[] uuidMsftBytes)
  4. uuidFromThriftBinary(byte[] uuidThriftBytes)