|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasn.ObjectIdentifier
This class represents an ASN.1 OBJECT IDENTIFIER.
An OBJECT IDENTIFIER value is an ordered list of non-negative numbers that represents a hierarchically globally-interpretable identifiers. Each number in the list is referred to as an arc.
All ObjectIdentifiers must have at least two arcs, where the value of the first arc must be 0, 1 or 2 and the value of the second arc must be at most 39 if the value of the first arc is 0 or 1.
| Constructor Summary | |
ObjectIdentifier(int[] oid)
Creates an object identifier from the specified list of component values (or arcs). |
|
ObjectIdentifier(String s)
Constructs an ASN.1 object identifier from a string representation of its arcs. |
|
| Method Summary | |
ObjectIdentifier |
append(int arc)
Concatenates the specified arc value to the end of this ObjectIdentifier arc sequence. |
ObjectIdentifier |
append(int[] roid)
Concatenates the specified arc array to the end of this ObjectIdentifier arc list.
|
boolean |
equals(Object o)
Compares this object identifier to the specified object identifier. |
int |
getComponent(int index)
Returns the arc value at the specified index. |
int |
hashCode()
Returns a hashcode for this object identifier. |
int |
length()
Returns the number of arcs contained in this ObjectIdentifier. |
byte[] |
toBER()
Returns the BER encoding of this ObjectIdentifier. |
String |
toString()
Returns a string form of this object identifier. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ObjectIdentifier(String s)
arc[0] "." arc[1] "." ... "." arc[n-1]
s - the dot separated string representation of the object
identifier.
IllegalArgumentException - if the specified string is incorrectly
formated.public ObjectIdentifier(int[] oid)
oid - the list of arcs.
IllegalArgumentException - if the specified array has a length
less that 2 or if one of the array values is negative or if| Method Detail |
public ObjectIdentifier append(int[] roid)
ObjectIdentifier arc list.
If the length of the argument array is 0, then this
ObjectIdentifier object is returned. Otherwise, a new
ObjectIdentifier object is created, representing an ordered
list of arc numbers that is the concatenation of the arc sequence
represented by this ObjectIdentifier object and the arc
sequence represented by the argument array.
roid - the array of arc numbers that is concatenated to the end of
this ObjectIdentifier arc list.
public ObjectIdentifier append(int arc)
ObjectIdentifier arc sequence.
arc - the arc value that is concatenated to the end of
this ObjectIdentifier arc sequence.
IllegalArgumentException - if the specified arc value is negative.public int length()
ObjectIdentifier.
ObjectIdentifier.public int getComponent(int index)
index - the index of arc.
IndexOutOfBoundsException - if the index argument is negative or
not less than the length of this object identifier.public String toString()
public byte[] toBER()
ObjectIdentifier.
ObjectIdentifier.public boolean equals(Object o)
true if and only if the argument is not null
and is an ObjectIdentifier object that represents the same sequence of
arcs as this object.
o - the object to compare this ObjectIdentifier
against.
true if the ObjectIdentifier objects
are equal; false otherwise.public int hashCode()
arc[0]^arc[1]^...^arc[n-1]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||