Class UID
java.lang.Object
com.dd.plist.NSObject
com.dd.plist.UID
- All Implemented Interfaces:
Cloneable,Comparable<NSObject>
The UID class holds a unique identifier.
Only found in binary property lists that are keyed archives.
- Author:
- Daniel Dreibrodt
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new UID instance.UID(String name, BigInteger value) Creates a new UID instance. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a deep copy of this instance.intbooleanbyte[]getBytes()Gets this instance's value.getName()Gets this instance's name.inthashCode()protected voidtoASCII(StringBuilder ascii, int level) protected voidtoASCIIGnuStep(StringBuilder ascii, int level) Converts this NSObject into an equivalent object of the Java Runtime Environment.toString()Methods inherited from class com.dd.plist.NSObject
fromJavaObject, getLocationInformation, indent, toJavaObject, toXMLPropertyList
-
Constructor Details
-
UID
Creates a new UID instance.- Parameters:
name- The UID name.value- The UID value.- Throws:
NullPointerException- If value is null.IllegalArgumentException- If value is negative or has a length of more than 128-bit.
-
UID
Creates a new UID instance.- Parameters:
name- The UID name.bytes- The UID value.- Throws:
NullPointerException- If bytes is null.IllegalArgumentException- If bytes represents a UID with a length of more than 128-bit (leading zero bytes are ignored).
-
-
Method Details
-
getBytes
public byte[] getBytes()Gets this instance's value.- Returns:
- The UID's value in big-endian representation, encoded on 1, 2, 4, 8 or 16 bytes.
-
getName
-
clone
-
toJavaObject
Description copied from class:NSObjectConverts this NSObject into an equivalent object of the Java Runtime Environment.NSArrayobjects are converted to arrays.NSDictionaryobjects are converted to objects extending theMapclass.NSSetobjects are converted to objects extending theSetclass.NSNumberobjects are converted to primitive number values (int, long, double or boolean).NSStringobjects are converted toStringobjects.NSDataobjects are converted to byte arrays.NSDateobjects are converted toDateobjects.UIDobjects are converted to byte arrays.
- Specified by:
toJavaObjectin classNSObject- Returns:
- A native java object representing this NSObject's value.
-
toASCII
-
toASCIIGnuStep
-
compareTo
-
equals
-
hashCode
-
toString
-