public final class ObjectIdentifier
extends java.lang.Object
implements java.io.Serializable
Object Identifiers are arbitrary length hierarchical identifiers. The individual components are numbers, and they define paths from the root of an ISO-managed identifier space. You will sometimes see a string name used instead of (or in addition to) the numerical id. These are synonyms for the numerical IDs, but are not widely used since most sites do not know all the requisite strings, while all sites can parse the numeric forms.
So for example, JavaSoft has the sole authority to assign the meaning to identifiers below the 1.3.6.1.4.42.2.17 node in the hierarchy, and other organizations can easily acquire the ability to assign such unique identifiers.
Modifier and Type | Field and Description |
---|---|
static java.util.Hashtable<java.lang.String,ObjectIdentifier> |
mOIDs
Netscape Enhancement:
This function implements a object identifier factory.
|
Constructor and Description |
---|
ObjectIdentifier(java.math.BigInteger[] values) |
ObjectIdentifier(DerInputStream in)
Constructs an object ID from an ASN.1 encoded input stream.
|
ObjectIdentifier(int[] values)
Constructs an object ID from an array of integers.
|
ObjectIdentifier(long[] values)
Constructs an object ID from an array of longs This
is used to construct constant object IDs.
|
ObjectIdentifier(java.lang.String oid)
Constructs an object identifier from a string.
|
Modifier and Type | Method and Description |
---|---|
void |
encode(DerOutputStream out) |
boolean |
equals(java.lang.Object other) |
boolean |
equals(ObjectIdentifier other)
Compares this identifier with another, for equality.
|
static ObjectIdentifier |
getObjectIdentifier(int[] values) |
static ObjectIdentifier |
getObjectIdentifier(java.lang.String oid) |
int |
hashCode() |
boolean |
precedes(ObjectIdentifier other)
Compares this identifier with another, for sorting purposes.
|
java.lang.String |
toString()
Returns a string form of the object ID.
|
public static java.util.Hashtable<java.lang.String,ObjectIdentifier> mOIDs
public ObjectIdentifier(java.lang.String oid)
public ObjectIdentifier(int[] values)
public ObjectIdentifier(java.math.BigInteger[] values)
public ObjectIdentifier(long[] values)
public ObjectIdentifier(DerInputStream in) throws java.io.IOException
NOTE: When an exception is thrown, the input stream has not been returned to its "initial" state.
in
- DER-encoded data holding an object IDjava.io.IOException
- indicates a decoding errorpublic void encode(DerOutputStream out) throws java.io.IOException
java.io.IOException
public boolean precedes(ObjectIdentifier other)
other
- identifer that may precede this one.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean equals(ObjectIdentifier other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static ObjectIdentifier getObjectIdentifier(java.lang.String oid) throws java.io.IOException
java.io.IOException
public static ObjectIdentifier getObjectIdentifier(int[] values) throws java.io.IOException
java.io.IOException