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 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(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(NSData uuid)
Encode a UUID in a String in hex
|
static 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 NSData generateAsNSData()
public static NSData decodeStringAsNSData(String uuid)
uuid
- the string representing a UUIDpublic static byte[] decodeStringAsByteArray(String uuid)
uuid
- the string representing a UUIDpublic static String encodeAsPrettyString(NSData uuid)
uuid
- a NSData containing a UUIDpublic static String encodeAsPrettyString(byte[] uuid)
uuid
- a byte[] containing a UUIDpublic static String encodeAsString(NSData uuid)
uuid
- a NSData containing a UUIDpublic static String encodeAsString(byte[] uuid)
uuid
- a byte[] containing a UUIDCopyright © 2002 – 2024 Project Wonder.