public class UUIDGenerator extends Object
Constructor and Description |
---|
UUIDGenerator() |
Modifier and Type | Method and Description |
---|---|
static String |
convertToString(byte[] uuid)
Converts a UUID in byte array form to the IETF string format.
|
static byte[] |
generateRandomUUIDBytes()
Generates a pseudo random UUID and returns it in byte array form.
|
static String |
generateRandomUUIDString()
Generates a pseudo random UUID and returns it the IETF specified
String form.
|
public static byte[] generateRandomUUIDBytes()
public static String generateRandomUUIDString()
convertToString(byte[])
for a description
of the format.public static String convertToString(byte[] uuid)
The BNF follows:
UUID ="-" "-" "-" "-" time_low = 4* time_mid = 2* time_high_and_version = 2* variant_and_sequence = 2* node = 6* hexOctet = hexDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "D" | "E" | "F"
uuid
- a 16 byteCopyright © 2015 JBoss, by Red Hat. All rights reserved.