|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ipdr.utils.UUIDUtil
public class UUIDUtil
The UUIDUtil class provides utilities for creating and displaying 128 bit (16 byte) UUID's.
This implementation deviates slightly from the original OSF DCE UUID specification (@see draft-leach-uuids-guids-01
Field Summary | |
---|---|
protected static short |
HOSTADDR_SIZE
Raw IP address size. |
protected static byte[] |
hostAddrs_
Raw IP address (in network byte order). |
protected static java.util.Random |
UUID_seed_
Random variable used in UUID creation. |
static short |
UUID_SIZE
Size of the UUID field when represented in hex binary. |
protected static int |
UUID_VARIANT
The OSF DCE variant. |
protected static short |
UUID_VERSION
This version is based on the OSF DCE version. |
Constructor Summary | |
---|---|
UUIDUtil()
|
Method Summary | |
---|---|
static byte[] |
convUUIDToByteArray(java.lang.String docId)
This method takes the UUID string format as per pattern specified in the NDM-U 3.0 specification as input and converts it into Byte array. |
static byte[] |
getNewUUID()
Method to get a new UUID. |
static void |
main(java.lang.String[] args)
Simple test entry point. |
static java.lang.String |
toString(byte[] uuid)
Generates a printable string containing the byte array in the standard UUID format. |
static int |
writeInt(byte[] buf,
int start,
int value)
Writes a 'int' to the input byte array. |
static int |
writeShort(byte[] buf,
int start,
short value)
Writes a 'short' to the input byte buffer at the specified starting index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short UUID_SIZE
protected static final short UUID_VERSION
protected static final int UUID_VARIANT
protected static java.util.Random UUID_seed_
protected static final short HOSTADDR_SIZE
protected static byte[] hostAddrs_
Constructor Detail |
---|
public UUIDUtil()
Method Detail |
---|
public static byte[] getNewUUID()
public static java.lang.String toString(byte[] uuid)
uuid
- 16 byte array containing a valid UUID.
public static byte[] convUUIDToByteArray(java.lang.String docId) throws IPDRException
docId
- UUID in String format
IPDRException
public static int writeInt(byte[] buf, int start, int value)
buf
- the array to write tostart
- the beginning offset in the array to start processingvalue
- a 'int' to be written
public static int writeShort(byte[] buf, int start, short value)
buf
- the array to write tostart
- the beginning offset in the array to start processingvalue
- a 'short' to be written
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |