public class UUIDUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static int |
typeByteOffset |
static int |
variationByteOffset |
Constructor and Description |
---|
UUIDUtilities() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decodeStringAsByteArray(String uuid)
Decode a string representing a UUID in hex.
|
static com.webobjects.foundation.NSData |
decodeStringAsNSData(String uuid)
Decode a string representing a UUID in hex.
|
static String |
encodeAsPrettyString(byte[] uuid)
Encode a UUID in a String using the usual format 12345678-1234-1234-1234-123456789ABC
|
static String |
encodeAsPrettyString(com.webobjects.foundation.NSData uuid)
Encode a UUID in a String using the usual format 12345678-1234-1234-1234-123456789ABC
|
static String |
encodeAsString(byte[] uuid)
Encode a UUID in a String in hex
|
static String |
encodeAsString(com.webobjects.foundation.NSData uuid)
Encode a UUID in a String in hex
|
static com.webobjects.foundation.NSData |
generateAsNSData()
Generate a type 4 UUID from a secure random source like the java UUID class.
|
public static final int typeByteOffset
public static final int variationByteOffset
public static com.webobjects.foundation.NSData generateAsNSData()
public static com.webobjects.foundation.NSData decodeStringAsNSData(String uuid)
uuid
- the string representing a UUIDpublic static byte[] decodeStringAsByteArray(String uuid)
uuid
- the string representing a UUIDpublic static String encodeAsPrettyString(com.webobjects.foundation.NSData uuid)
uuid
- a NSData containing a UUIDpublic static String encodeAsPrettyString(byte[] uuid)
uuid
- a byte[] containing a UUIDpublic static String encodeAsString(com.webobjects.foundation.NSData uuid)
uuid
- a NSData containing a UUIDpublic static String encodeAsString(byte[] uuid)
uuid
- a byte[] containing a UUIDCopyright © 2002 – 2020 Project Wonder.