public class UUID extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UUID_LENGTH |
static int |
UUID_LENGTH_BINARY |
Constructor and Description |
---|
UUID(byte[] buf,
int off)
Class constructor
|
UUID(long lowBits,
long highBits)
Class constructor
|
UUID(String id)
Class constructor
|
UUID(String id,
int ver)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareTo(UUID id)
Compare a UUID with the current UUID
|
static String |
generateUUIDString(byte[] buf)
Generate a UUID string from the binary representation
|
byte[] |
getBytes()
Return the UUID as a byte array
|
String |
getUUID()
Return the UUID string
|
int |
getVersion()
Return the interface version
|
boolean |
isValid()
Determine if the UUID is valid
|
void |
setVersion(int ver)
Set the interface version
|
int |
storeUUID(byte[] buf,
int off,
boolean writeVer)
Write the binary UUID to the specified buffer, and optionally the UUID version
|
String |
toString()
Return the UUID as a string
|
static boolean |
validateUUID(String idStr)
Validate a UUID string
|
public static final int UUID_LENGTH
public static final int UUID_LENGTH_BINARY
public UUID(String id)
id
- Stringpublic UUID(String id, int ver)
id
- Stringver
- intpublic UUID(byte[] buf, int off)
buf
- byte[]off
- intpublic UUID(long lowBits, long highBits)
lowBits
- longhighBits
- longpublic final boolean isValid()
public final String getUUID()
public final int getVersion()
public final void setVersion(int ver)
ver
- intpublic final byte[] getBytes()
public static final boolean validateUUID(String idStr)
idStr
- Stringpublic static final String generateUUIDString(byte[] buf)
buf
- byte[]public final boolean compareTo(UUID id)
id
- UUIDpublic final int storeUUID(byte[] buf, int off, boolean writeVer)
buf
- byte[]off
- intwriteVer
- booleanCopyright © 2005–2018 Alfresco Software. All rights reserved.