public class GUIDUtil extends Object
Due to how MS structures a UUID (GUID) in c and its decomposition into
a string, there are some rather unique little endian conversions that take
place.
For example:
Hex string: a1b1c1d1a2b2a3b3a4b4a5b5c5d5e5f5
GUID string: {d1c1b1a1-b2a2-b3a3-b4a4-a5b5c5d5e5f5}
Implied MS c-struct:
struct {
int lowTime;
short midTime;
short highTimeAndVersion;
short sequenceAndVariant;
uchar[] macaddr;
} GUID
Note: These conversions will leave the original version and variant in tact and
will not convert to the MS version and variant or vice-versa.| Constructor and Description |
|---|
GUIDUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
guidStringFromHexString(String hexString)
Convert hex string to GUID string
|
static String |
hexStringFromGUID(String guidString)
Convert GUID string to a HEX string
|
public static String guidStringFromHexString(String hexString)
hexString - - an untokenized hex stringIllegalArgumentExceptionpublic static String hexStringFromGUID(String guidString)
guidString - - tokenized MS-style GUID stringIllegalArgumentExceptionCopyright © 2017 LSST. All rights reserved.