public class UUIDUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
createUUID()
Use the createUUID function when you need a unique string that you will
use as a persistent identifier in a distributed environment.
|
static String |
createUUID(boolean secure) |
static String |
fromByteArray(byte[] ba)
Converts a 128-bit UID encoded as a byte[] to a String representation.
|
static boolean |
isUID(String uid)
A utility method to check whether a String value represents a
correctly formatted UID value.
|
static byte[] |
toByteArray(String uid)
Converts a UID formatted String to a byte[].
|
public static String createUUID()
public static String fromByteArray(byte[] ba)
ba - byte[] 16 bytes in length representing a 128-bit UID.public static boolean isUID(String uid)
uid - The value to test whether it is formatted as a UID.public static byte[] toByteArray(String uid)
uid - String representing a 128-bit UID.Copyright © 2015 The Apache Software Foundation. All rights reserved.