public class UuidUtils extends Object
| Constructor and Description |
|---|
UuidUtils() |
| Modifier and Type | Method and Description |
|---|---|
static UUID |
arrayToUuid(byte[] bytes,
int index)
Convert part of a byte array to a UUID.
|
static UUID |
convertHashOutputToVersion5UUID(byte[] uuidBytes) |
static String |
formatUUID(UUID uuid)
Convert a standard Java UUID to the ST1204 text representation.
|
static UUID |
parseUUID(String identifier)
Parse an ST1204 style identifier to a standard Java UUID.
|
static byte[] |
uuidStringToByteArray(String uuidString)
Convert a hex String (in UUID format) to a byte array.
|
static byte[] |
uuidToArray(UUID uuid)
Get the content of a UUID as a byte array.
|
public static UUID parseUUID(String identifier)
identifier - the identifier to convert.public static byte[] uuidToArray(UUID uuid)
uuid - the UUID to convertpublic static UUID arrayToUuid(byte[] bytes, int index)
bytes - the byte arrayindex - the offset into the byte array where the UUID should be read frompublic static String formatUUID(UUID uuid)
uuid - the UUID to format as textpublic static UUID convertHashOutputToVersion5UUID(byte[] uuidBytes)
public static byte[] uuidStringToByteArray(String uuidString)
Per ST1204 algorithm, the separators are ignored.
uuidString - the string to convertCopyright © 2021 West Ridge Systems. All rights reserved.