|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.demac.impl.j2me.process.base.service.webservices.asn1.ASN1AbstractType
org.demac.impl.j2me.process.base.service.webservices.asn1.ASN1ObjectIdentifier
public class 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(java.lang.String s)
Creates an ASN.1 OBJECT IDENTIFIER instance initialized from the given OID string representation. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this instance. |
int |
compareTo(java.lang.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(java.lang.Object o)
Compares two OIDs for equality. |
int[] |
getOID()
DOCUMENT ME! |
int |
getTag()
DOCUMENT ME! |
java.lang.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! |
java.lang.String |
toString()
Returns the string representation of this OID. |
Methods inherited from class org.demac.impl.j2me.process.base.service.webservices.asn1.ASN1AbstractType |
---|
checkConstraints, getConstraint, getTagClass, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, writeExternal |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ASN1ObjectIdentifier()
public ASN1ObjectIdentifier(int[] oid)
oid
- The array of consecutive integers of the OID.
java.lang.NullPointerException
- if the given oid
is null
.
java.lang.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(java.lang.String s) throws java.lang.NumberFormatException
s
- string representation of oid
java.lang.NumberFormatException
- if some element of the OID string is not an integer
number.
java.lang.IllegalArgumentException
- if the string is not a well-formed OID.Method Detail |
---|
public java.lang.Object getValue()
getValue
in interface ASN1Type
getValue
in class ASN1AbstractType
public int[] getOID()
public void setOID(int[] oid) throws ConstraintException
oid
- DOCUMENT ME!
ConstraintException
- DOCUMENT ME!public int elementCount()
public int getTag()
getTag
in interface ASN1Type
getTag
in class ASN1AbstractType
public void encode(Encoder enc) throws ASN1Exception, java.io.IOException
encode
in interface ASN1Type
encode
in class ASN1AbstractType
enc
- The encoder to encode to.
ASN1Exception
java.io.IOException
public void decode(Decoder dec) throws ASN1Exception, java.io.IOException
decode
in interface ASN1Type
decode
in class ASN1AbstractType
dec
- DOCUMENT ME!
ASN1Exception
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- 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 java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- The OID to compare to.
java.lang.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 check
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |