|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.utils.UUIDBasedOID
public class UUIDBasedOID
A class for creating and convertin UUID based OIDs.
| Field Summary | |
|---|---|
protected String |
oid
|
protected static String |
OID_PREFIX
|
protected static String |
OID_PREFIX_REMOVAL_REGEX
|
protected UUID |
uuid
|
| Constructor Summary | |
|---|---|
UUIDBasedOID()
Construct a new OID with a new random UUID. |
|
UUIDBasedOID(String oid)
Construct an OID from an existing string representation of an OID. |
|
UUIDBasedOID(UUID nameSpace,
byte[] bName)
Construct a new OID with a Type 3 UUID (that is based on an MD5 hash of the supplied byte arrayss). |
|
| Method Summary | |
|---|---|
static String |
createOIDFromUUIDCanonicalHexString(String hexString)
Create an OID from the canonical hex string form of a UUID. |
static byte[] |
getByteArrayInNetworkByteOrderFromUUID(UUID uuid)
|
String |
getOID()
Get the string representation of the OID. |
UUID |
getUUID()
Get the UUID of the OID. |
static BigInteger |
makeBigIntegerFromUnsignedLong(long unsignedLongValue)
Convert an unsigned value in a long to a BigInteger. |
static UUID |
parseUUIDFromDecimalString(String decimalString)
Extract the UUID from its single integer value decimal string representation. |
static UUID |
parseUUIDFromOID(String oid)
Extract the UUID from a UUID-based OID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String OID_PREFIX
protected static final String OID_PREFIX_REMOVAL_REGEX
protected UUID uuid
protected String oid
| Constructor Detail |
|---|
public UUIDBasedOID(UUID nameSpace,
byte[] bName)
Construct a new OID with a Type 3 UUID (that is based on an MD5 hash of the supplied byte arrayss).
Given the same bytes as input, the same OID will be returned every time.
The name space represents the entity, an instance of which is being uniquely identified.
The name bytes might, for example, be a UTF-8 encoding of a String that contains a bunch of attribute values separated by some delimiter like a "|"
nameSpace - a non-null UUID defining the name spacebName - a non-null non-zero length array of bytes containing the "name" (any values)public UUIDBasedOID()
Construct a new OID with a new random UUID.
public UUIDBasedOID(String oid)
throws IllegalArgumentException,
NumberFormatException
Construct an OID from an existing string representation of an OID.
oid - a String of dotted numeric values in OID form {joint-iso-itu-t uuid(25) IllegalArgumentException
NumberFormatException| Method Detail |
|---|
public static byte[] getByteArrayInNetworkByteOrderFromUUID(UUID uuid)
public String getOID()
Get the string representation of the OID.
public UUID getUUID()
Get the UUID of the OID.
public static UUID parseUUIDFromOID(String oid)
throws IllegalArgumentException,
NumberFormatException
Extract the UUID from a UUID-based OID.
oid - a String of dotted numeric values in OID form {joint-iso-itu-t uuid(25) IllegalArgumentException - if the OID is not in the {joint-iso-itu-t uuid(25)} arc
NumberFormatException - if the OID does not contain a uuid-single-integer-value
public static UUID parseUUIDFromDecimalString(String decimalString)
throws NumberFormatException
Extract the UUID from its single integer value decimal string representation.
decimalString - single integer value decimal string representation
NumberFormatException - if the OID does not contain a uuid-single-integer-valuepublic static BigInteger makeBigIntegerFromUnsignedLong(long unsignedLongValue)
Convert an unsigned value in a long to a BigInteger.
unsignedLongValue - an unsigned long value (i.e., the sign bit is treated as part of the value rather than a sign)
public static String createOIDFromUUIDCanonicalHexString(String hexString)
throws IllegalArgumentException
Create an OID from the canonical hex string form of a UUID.
hexString - canonical hex string form of a UUID
IllegalArgumentException - if name does not conform to the string representation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||