|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--codec.asn1.ASN1AbstractType
|
+--codec.asn1.ASN1ObjectIdentifier
Represents an ASN.1 OBJECT IDENTIFIER type. The corresponding Java type is
int[]. Constraints are checked for this type only at the end
of method decode.
| Constructor Summary | |
ASN1ObjectIdentifier()
Creates a new ASN1ObjectIdentifier object. |
|
ASN1ObjectIdentifier(int[] oid)
Creates an instance with the given array of integers as elements. |
|
ASN1ObjectIdentifier(String s)
Creates an ASN.1 OBJECT IDENTIFIER instance initialized from the given OID string representation. |
|
| Method Summary | |
Object |
clone()
Returns a clone of this instance. |
int |
compareTo(Object o)
This method compares two OID and returns -1, 0, 1 if this OID is less than, equal or greater than the given one. |
void |
decode(Decoder dec)
Decodes to this ASN1ObjectIdentifier. |
int |
elementCount()
Returns the number of elements of the oid. |
void |
encode(Encoder enc)
Encodes this ASN1ObjectIdentifier. |
boolean |
equals(Object o)
Compares two OIDs for equality. |
int[] |
getOID()
DOCUMENT ME! |
int |
getTag()
DOCUMENT ME! |
Object |
getValue()
DOCUMENT ME! |
int |
hashCode()
This method computes the hash code of this instance. |
boolean |
isPrefixOf(ASN1ObjectIdentifier o)
This method determines whether the given OID is part of the OID family defined by this OID prefix. |
void |
setOID(int[] oid)
DOCUMENT ME! |
String |
toString()
Returns the string representation of this OID. |
| Methods inherited from class codec.asn1.ASN1AbstractType |
checkConstraints, getConstraint, getTagClass, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, writeExternal |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ASN1ObjectIdentifier()
public ASN1ObjectIdentifier(int[] oid)
oid - The array of consecutive integers of the OID.NullPointerException - if the given oid
is null.IllegalArgumentException - if the given
oid is not well-formed. For
instance, a bad oid might have a value
greater than 2 as its first element.
public ASN1ObjectIdentifier(String s)
throws NumberFormatException
s - string representation of oidNumberFormatException - if some element of the OID string is not an integer
number.IllegalArgumentException - if the string is not a well-formed OID.| Method Detail |
public Object getValue()
getValue in class ASN1AbstractTypepublic int[] getOID()
public void setOID(int[] oid)
throws ConstraintException
oid - DOCUMENT ME!ConstraintException - DOCUMENT ME!public int elementCount()
public int getTag()
getTag in class ASN1AbstractType
public void encode(Encoder enc)
throws ASN1Exception,
IOException
encode in class ASN1AbstractTypeenc - The encoder to encode to.ASN1Exception - IOException -
public void decode(Decoder dec)
throws ASN1Exception,
IOException
decode in class ASN1AbstractTypedec - DOCUMENT ME!ASN1Exception - IOException - public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objecto - The object to compare to.true iff the given object is an
ASN1ObjectIdentifier and iff it equals this one.public int hashCode()
hashCode in class Objectpublic int compareTo(Object o)
compareTo in interface Comparableo - The OID to compare to.ClassCastException - iff o is not an ASN1ObjectIdentifier.public boolean isPrefixOf(ASN1ObjectIdentifier o)
true if this OID is a prefix of the given one.o - the oid to checkpublic Object clone()
clone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||