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.1.42.2.17 node in the hierarchy, and other organizations can easily acquire the ability to assign such unique identifiers.
Constructor and Description |
---|
ObjectIdentifier(DerInputStream in)
Constructor, from an ASN.1 encoded input stream.
|
ObjectIdentifier(int[] values)
Constructor, from an array of integers.
|
ObjectIdentifier(java.lang.String oid)
Constructs, from a string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this identifier with another, for equality.
|
boolean |
equals(ObjectIdentifier other)
Deprecated.
Use equals((Object)oid)
|
int |
hashCode() |
static ObjectIdentifier |
newInternal(int[] values)
This method is kept for compatibility reasons.
|
java.lang.String |
toString()
Returns a string form of the object ID.
|
public ObjectIdentifier(java.lang.String oid) throws java.io.IOException
java.io.IOException
public ObjectIdentifier(int[] values) throws java.io.IOException
java.io.IOException
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 static ObjectIdentifier newInternal(int[] values)
@Deprecated public boolean equals(ObjectIdentifier other)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2025. All rights reserved.