java.util.UUID.nameUUIDFromBytes(byte[] name) 方法示例


java.util.UUID.nameUUIDFromBytes(byte[] name) 方法示例

package com.codingdict;

import java.util.*;

public class UUIDDemo {
   public static void main(String[] args) {

      // creating byte array
      byte[] nbyte = {10,20,30};

      // creating UUID from byte     
      UUID uid = UUID.nameUUIDFromBytes(nbyte);     

      // checking UUID value
      System.out.println("UUID value from byte: "+uid);    
   }     
}