| Modifier and Type | Field and Description |
|---|---|
static int |
GUID_LENGTH |
| Constructor and Description |
|---|
Guid(byte[] bytes)
Creates a
Guid by computing the sha of the input bytes. |
| Modifier and Type | Method and Description |
|---|---|
Guid |
append(byte[]... byteArrays)
Creates a new
Guid which is a unique, replicable representation of the pair (this, byteArrays). |
Guid |
append(Guid... guids)
Creates a new
Guid which is a unique, replicable representation of the pair (this, guids). |
Guid |
append(HasGuid... objs)
Creates a new
Guid which is a unique, replicable representation of the pair (this, objs). |
static Guid |
combine(Guid... guids)
|
static Guid |
deserialize(String str)
Reverse of
toString(). |
static Guid |
fromByteArrays(byte[]... byteArrays)
Generate a
Guid for an array of byte arrays. |
static Guid |
fromHasGuid(HasGuid... objs)
|
static Guid |
fromStrings(String... strings)
Generate a
Guid for an array of Strings. |
String |
toString()
Serializes the guid into a hex string.
|
public static final int GUID_LENGTH
public Guid(byte[] bytes)
Guid by computing the sha of the input bytes.public static Guid fromHasGuid(HasGuid... objs) throws IOException
objs - array of HasGuid.Guid for the array.IOExceptionpublic static Guid fromStrings(String... strings) throws IOException
Guid for an array of Strings.strings - array of Strings.Guid for the array.IOExceptionpublic static Guid fromByteArrays(byte[]... byteArrays) throws IOException
Guid for an array of byte arrays.byteArrays - array of byte arrays.Guid for the array.IOExceptionpublic static Guid deserialize(String str) throws IOException
toString(). Deserializes a Guid from a previously serialized one.str - Serialized Guid.Guid.IOExceptionpublic static Guid combine(Guid... guids) throws IOException
IOExceptionpublic Guid append(byte[]... byteArrays) throws IOException
Guid which is a unique, replicable representation of the pair (this, byteArrays).byteArrays - an array of byte arrays.Guid.IOExceptionpublic Guid append(Guid... guids) throws IOException
Guid which is a unique, replicable representation of the pair (this, guids). Equivalent to
combine(this, guid1, guid2, ...)guids - an array of Guid.Guid.IOExceptionpublic Guid append(HasGuid... objs) throws IOException
Guid which is a unique, replicable representation of the pair (this, objs).objs - an array of HasGuid.Guid.IOExceptionpublic String toString()
Guid can be recovered using deserialize(java.lang.String).