|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.uuid.impl.UUIDUtil
public class UUIDUtil
Field Summary | |
---|---|
static int |
BYTE_OFFSET_CLOCK_HI
|
static int |
BYTE_OFFSET_CLOCK_LO
|
static int |
BYTE_OFFSET_CLOCK_MID
|
static int |
BYTE_OFFSET_CLOCK_SEQUENCE
|
static int |
BYTE_OFFSET_TYPE
|
static int |
BYTE_OFFSET_VARIATION
|
Constructor Summary | |
---|---|
UUIDUtil()
|
Method Summary | |
---|---|
static byte[] |
asByteArray(UUID uuid)
|
static UUID |
constructUUID(UUIDType type,
byte[] uuidBytes)
Helper method for constructing UUID instances with appropriate type |
static UUID |
constructUUID(UUIDType type,
long l1,
long l2)
|
protected static long |
gatherLong(byte[] buffer,
int offset)
|
static long |
initUUIDFirstLong(long l1,
int rawType)
|
static long |
initUUIDFirstLong(long l1,
UUIDType type)
|
static long |
initUUIDSecondLong(long l2)
|
static void |
toByteArray(UUID uuid,
byte[] buffer)
|
static void |
toByteArray(UUID uuid,
byte[] buffer,
int offset)
|
static UUIDType |
typeOf(UUID uuid)
Method for determining which type of UUID given UUID is. |
static UUID |
uuid(byte[] bytes)
Factory method for constructing UUID instance from given
16 bytes. |
static UUID |
uuid(byte[] bytes,
int offset)
Factory method for constructing UUID instance from given
16 bytes. |
static UUID |
uuid(String id)
Factory method for creating UUIDs from the canonical string representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BYTE_OFFSET_CLOCK_LO
public static final int BYTE_OFFSET_CLOCK_MID
public static final int BYTE_OFFSET_CLOCK_HI
public static final int BYTE_OFFSET_TYPE
public static final int BYTE_OFFSET_CLOCK_SEQUENCE
public static final int BYTE_OFFSET_VARIATION
Constructor Detail |
---|
public UUIDUtil()
Method Detail |
---|
public static UUID uuid(String id)
id
- String that contains the canonical representation of
the UUID to build; 36-char string (see UUID specs for details).
Hex-chars may be in upper-case too; UUID class will always output
them in lowercase.public static UUID uuid(byte[] bytes)
UUID
instance from given
16 bytes.
NOTE: since absolutely no validation is done for contents, this method should
only be used if contents are known to be valid.
public static UUID uuid(byte[] bytes, int offset)
UUID
instance from given
16 bytes.
NOTE: since absolutely no validation is done for contents, this method should
only be used if contents are known to be valid.
bytes
- Array that contains sequence of 16 bytes that contain a valid UUIDoffset
- Offset of the first of 16 bytespublic static UUID constructUUID(UUIDType type, byte[] uuidBytes)
public static UUID constructUUID(UUIDType type, long l1, long l2)
public static long initUUIDFirstLong(long l1, UUIDType type)
public static long initUUIDFirstLong(long l1, int rawType)
public static long initUUIDSecondLong(long l2)
public static UUIDType typeOf(UUID uuid)
uuid
- UUID to check
public static byte[] asByteArray(UUID uuid)
public static void toByteArray(UUID uuid, byte[] buffer)
public static void toByteArray(UUID uuid, byte[] buffer, int offset)
protected static final long gatherLong(byte[] buffer, int offset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |