public class LongObjectId extends AnyLongObjectId implements java.io.Serializable
ObjectId
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private static LongObjectId |
ZEROID |
private static java.lang.String |
ZEROID_STR |
w1, w2, w3, w4
Modifier | Constructor and Description |
---|---|
protected |
LongObjectId(AnyLongObjectId src)
Initialize this instance by copying another existing LongObjectId.
|
(package private) |
LongObjectId(long new_1,
long new_2,
long new_3,
long new_4) |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(byte[] firstBuffer,
int fi,
byte[] secondBuffer,
int si)
Compare two object identifier byte sequences for equality.
|
private static LongObjectId |
fromHexString(byte[] bs,
int p) |
static LongObjectId |
fromRaw(byte[] bs)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(byte[] bs,
int p)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(long[] is)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(long[] is,
int p)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromString(byte[] buf,
int offset)
Convert a LongObjectId from hex characters (US-ASCII).
|
static LongObjectId |
fromString(java.lang.String str)
Convert a LongObjectId from hex characters.
|
static boolean |
isId(java.lang.String id)
Test a string of characters to verify that it can be interpreted as
LongObjectId.
|
private void |
readObject(java.io.ObjectInputStream ois) |
LongObjectId |
toObjectId()
Obtain an immutable copy of this current object.
|
static java.lang.String |
toString(LongObjectId i)
Convert a LongObjectId into a hex string representation.
|
private void |
writeObject(java.io.ObjectOutputStream os) |
static LongObjectId |
zeroId()
Get the special all-zero LongObjectId.
|
abbreviate, compareTo, compareTo, compareTo, copy, copyRawTo, copyRawTo, copyRawTo, copyRawTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, equals, equals, equals, formatHexChar, getByte, getFirstByte, getName, getSecondByte, hashCode, isEqual, name, startsWith, toHexCharArray, toString
private static final long serialVersionUID
private static final LongObjectId ZEROID
private static final java.lang.String ZEROID_STR
LongObjectId(long new_1, long new_2, long new_3, long new_4)
protected LongObjectId(AnyLongObjectId src)
This constructor is mostly useful for subclasses which want to extend a LongObjectId with more properties, but initialize from an existing LongObjectId instance acquired by other means.
src
- another already parsed LongObjectId to copy the value out of.public static final LongObjectId zeroId()
public static final boolean isId(java.lang.String id)
If true the string can be parsed with fromString(String)
.
id
- the string to test.public static final java.lang.String toString(LongObjectId i)
i
- the id to convert. May be null.public static boolean equals(byte[] firstBuffer, int fi, byte[] secondBuffer, int si)
firstBuffer
- the first buffer to compare against. Must have at least 32
bytes from position fi through the end of the buffer.fi
- first offset within firstBuffer to begin testing.secondBuffer
- the second buffer to compare against. Must have at least 32
bytes from position si through the end of the buffer.si
- first offset within secondBuffer to begin testing.public static final LongObjectId fromRaw(byte[] bs)
bs
- the raw byte buffer to read from. At least 32 bytes must be
available within this byte array.public static final LongObjectId fromRaw(byte[] bs, int p)
bs
- the raw byte buffer to read from. At least 32 bytes after p
must be available within this byte array.p
- position to read the first byte of data from.public static final LongObjectId fromRaw(long[] is)
is
- the raw long buffer to read from. At least 4 longs must be
available within this long array.public static final LongObjectId fromRaw(long[] is, int p)
is
- the raw long buffer to read from. At least 4 longs after p
must be available within this long array.p
- position to read the first long of data from.public static final LongObjectId fromString(byte[] buf, int offset)
buf
- the US-ASCII buffer to read from. At least 64 bytes after
offset must be available within this byte array.offset
- position to read the first character from.public static LongObjectId fromString(java.lang.String str)
str
- the string to read from. Must be 64 characters long.private static final LongObjectId fromHexString(byte[] bs, int p)
public LongObjectId toObjectId()
See AnyLongObjectId.copy()
if this
is a possibly subclassed (but
immutable) identity and the application needs a lightweight identity
only reference.
toObjectId
in class AnyLongObjectId
this
if this is already an
immutable instance.private void writeObject(java.io.ObjectOutputStream os) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream ois) throws java.io.IOException
java.io.IOException