iaik.asn1
Class ObjectID

java.lang.Object
  |
  +--iaik.asn1.ASN1Object
        |
        +--iaik.asn1.ObjectID

public class ObjectID
extends ASN1Object

This class implements the ASN.1 native type "OBJECT IDENTIFIER". OBJECT IDENTIFIER is a simple non-string ASN.1 type identified by the UNIVERSAL TAG number 6. An ASN.1 OBJECT IDENTIFIER object represents an object identifier. It consists of a sequence of integer components and is used for identifying some abstract information object (for instance an algorithm, an attribute type, or even a registration authority that defines other object identifiers).

This class uses Strings as representation of object identifiers. For example: "1.2.3.4".

This class is responsible for generating ObjectIDs for several X.500, PKCS#7, PKCS#9, PKCS#12 and PKIX objects that may be used by specifying the corresponding objectID´s name: ObjectID.<name>,

for instance:

 ObjectID policyQualifierId = ObjectID.id_pkix_cps;
 
Beside this, new ObjectIDs may be created by using one of the several constructors, either by only specifying the OID-String of the new ObjectID, or by additionally specifying the name (and the shortName). When name (and shortName) are specified, they are automatically registered for the new ObjectID, e.g:
 String oidStr = "9.5.12345.17.8";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID myOID = new ObjectID(oidStr, name, shortName);
 
Otherwise, if only the OID string for the new ObjectID is supplied, no name respectively shortName registration can be performed.

When creating a new ObjectID by means of one of the several constructors, an already existing ObjectID with the same oid string will be replaced. For that reason it may be useful to call the hasRegisteredName method for querying if a name already has been registered for some particular oid before creating a new one - and overwriting the old one, e.g.:

 String oidStr = "9.5.12345.17.8";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name, shortName); 
 }   
 
The hasRegisteredName method only will return true if a name already has been regsitered; in that way, it will return false, if only an OID string - and no name/shortName - has been specified when creating the ObjectID in mind.

See Also:
ASN1Object, ASN

Field Summary
static ObjectID caIssuers
          Creates an ObjectID for the x.509 AccessDescription access method caIssuers, as defined by RFC 2459.
static ObjectID certTypes
          Creates an ObjectID for the PKCS#9 object certTypes.
static ObjectID challengePassword
          Creates an ObjectID for the PKCS#9 object challengePassword.
static ObjectID commonName
          Creates an ObjectID for the X.500 attribute type commonName (shortName CN).
static ObjectID contentType
          Creates an ObjectID for the PKCS#9 object contentType.
static ObjectID countersignature
          Creates an ObjectID for the PKCS#9 object countersignature.
static ObjectID country
          Creates an ObjectID for the X.500 attribute type countryName (shortName C).
static ObjectID crlTypes
          Creates an ObjectID for the PKCS#9 object crlTypes.
static ObjectID dnQualifier
          Creates an ObjectID for the x.500 attribute type dnQualifier (distinguished name qualifier).
static ObjectID domainComponent
          Creates an ObjectID for the x.500 attribute type domainComponent (shortName DC), as defined by RFC 2247.
static ObjectID emailAddress
          Creates an ObjectID for the PKCS#9 object emailAddress (shortName EMAIL).
static ObjectID extendedCertificateAttributes
          Creates an ObjectID for the PKCS#9 object extendedCertificateAttributes.
static ObjectID friendlyName
          Creates an ObjectID for the PKCS#9 object friendlyName.
static ObjectID generationQualifier
          Creates an ObjectID for the x.500 attribute type generationQualifier.
static ObjectID givenName
          Creates an ObjectID for the x.500 attribute type givenName, added by Telia.
static ObjectID id_pkix_cps
          Creates an ObjectID for the PKIX object id-pkix-cps indicating a CPS Pointer qualifier for defining a (URI) pointer to a Certification Practice Statement (CPS) describing a particular CA policy.
static ObjectID id_pkix_unotice
          Creates an ObjectID for the PKIX object id-pkix-unotice indicating a User Notice qualifier for describing a particular CA policy.
static ObjectID initials
          Creates an ObjectID for the x.500 attribute type initials.
static ObjectID locality
          Creates an ObjectID for the X.500 attribute type localityName (shortName L).
static ObjectID localKeyID
          Creates an ObjectID for the PKCS#9 object localKeyID.
static ObjectID messageDigest
          Creates an ObjectID for the PKCS#9 object messageDigest.
static ObjectID netscape
          The Netscape base object identifier.
static ObjectID netscapeCertSequence
          The Netscape cert seequence object identifier.
static ObjectID organization
          Creates an ObjectID for the X.500 attribute type organizationName (shortName O).
static ObjectID organizationalUnit
          Creates an ObjectID for the X.500 attribute type organizationalUnitName (shortName OU).
static ObjectID pkcs12_certBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 certBag.
static ObjectID pkcs12_CertBagIds
          Creates an ObjectID for the PKCS#12 object PKCS#12 CertBagIds When using it, type ObjectID.pkcs12_CertBagIds
static ObjectID pkcs12_crlBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 crlBag.
static ObjectID pkcs12_keyBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 keyBag.
static ObjectID pkcs12_pkcs8ShroudedKeyBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 pkcs8ShroudedKeyBag.
static ObjectID pkcs12_safeContentsBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 safeContentsBag.
static ObjectID pkcs12_SDSICertBagId
          Creates an ObjectID for the PKCS#12 object PKCS#12 SDSICertBagId.
static ObjectID pkcs12_secretBag
          Creates an ObjectID for the PKCS#12 object PKCS#12 secretBag.
static ObjectID pkcs12_Version1
          Creates an ObjectID for the PKCS#12 object PKCS#12 Version1.
static ObjectID pkcs12_Version1_BagIds
          Creates an ObjectID for the PKCS#12 object PKCS#12 Version1 BagIds.
static ObjectID pkcs12_x509CertCRLBagId
          Creates an ObjectID for the PKCS#12 object PKCS#12 x509CertCRLBagId.
static ObjectID pkcs7
          Creates an ObjectID for the PKCS#7 object PKCS#7.
static ObjectID pkcs7_data
          Creates an ObjectID for the PKCS#7 object PKCS#7 data.
static ObjectID pkcs7_digestedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 digestedData.
static ObjectID pkcs7_encryptedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 encryptedData.
static ObjectID pkcs7_envelopedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 envelopedData.
static ObjectID pkcs7_signedAndEnvelopedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 signedAndEnvelopedData.
static ObjectID pkcs7_signedData
          Creates an ObjectID for the PKCS#7 object PKCS#7 signedData.
static ObjectID sdsiCertificate
          Creates an ObjectID for the PKCS#9 object sdsiCertificate.
static ObjectID serialNumber
          Creates an ObjectID for the X.500 attribute type serialNumber (shortName CN).
static ObjectID signingDescription
          Creates an ObjectID for the PKCS#9 object signingDescription.
static ObjectID signingTime
          Creates an ObjectID for the PKCS#9 object signingTime.
static ObjectID stateOrProvince
          Creates an ObjectID for the X.500 attribute type stateOrProvinceName (shortName ST).
static ObjectID streetAddress
          Creates an ObjectID for the X.500 attribute type streetAddress (shortName STREET).
static ObjectID surName
          Creates an ObjectID for the x.500 attribute type surname (shortName SN), added by Telia.
static ObjectID symmetricCapabilities
          Creates an ObjectID for the PKCS#9 object symmetricCapabilities.
static ObjectID title
          Creates an ObjectID for the X.500 attribute type title (shortName T).
static ObjectID uniqueIdentifier
          Creates an ObjectID for the x.500 attribute type uniqueIdentifier, added by Telia.
static ObjectID unstructuredAddress
          Creates the PKCS#9 ObjectID unstructeredAddress.
static ObjectID unstructuredName
          Creates an ObjectID for the PKCS#9 object unstructeredName.
static ObjectID x509Certificate
          Creates an ObjectID for the PKCS#9 object x509Certificate.
static ObjectID x509Crl
          Creates an ObjectID for the PKCS#9 object x509Crl.
 
Fields inherited from class iaik.asn1.ASN1Object
asnType, encode_listener, stream_mode
 
Constructor Summary
protected ObjectID()
          The default constructor.
  ObjectID(java.lang.String oid)
          Constructs an ObjectID from a String.
  ObjectID(java.lang.String oid, java.lang.String name)
          Constructs an ObjectID from a String representation and a String name.
  ObjectID(java.lang.String oid, java.lang.String name, java.lang.String shortName)
          Constructs an ObjectID from a String representation, a String name, and a String shortName.
 
Method Summary
protected  void decode(int length, java.io.InputStream is)
          Decodes the next available data from the InputStream.
protected  void encode(java.io.OutputStream os)
          DER encodes this OBjectID ASN1Object and writes the result to given OutputStream.
 boolean equals(java.lang.Object obj)
          Compares this ObjectID to the specified object.
 java.lang.String getID()
          Returns the objectID as string.
static ObjectID getInstance(java.lang.String name)
          This method is responsible for returning an ObjectID given either the registered name or the short name of any existing OID that has already been registered.
 java.lang.String getName()
          Returns the name registered for this ObjectID or the object identifier if there is no name registered.
 java.lang.String getShortName()
          Returns the short name registered for this ObjectID.
 java.lang.Object getValue()
          Returns the value of this ObjectID as a String object.
 int hashCode()
          Returns a hash code for this object.
static boolean hasRegisteredName(java.lang.String oid)
          Looks if a name for the object identifier specified by the given OID string already is registered.
 void setValue(java.lang.Object object)
          Sets the value of this object to value (e.g.
 java.lang.String toString()
          Returns a string that represents the contents of the ObjectID.
 
Methods inherited from class iaik.asn1.ASN1Object
addComponent, addEncodeListener, countComponents, encodeObject, getAsnType, getComponentAt, indefiniteLength, isA, isConstructed, setIndefiniteLength, setIndefiniteRecursive
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

commonName

public static ObjectID commonName
Creates an ObjectID for the X.500 attribute type commonName (shortName CN). When using it, type ObjectID.commonName

serialNumber

public static ObjectID serialNumber
Creates an ObjectID for the X.500 attribute type serialNumber (shortName CN). When using it, type ObjectID.serialNumber.

country

public static ObjectID country
Creates an ObjectID for the X.500 attribute type countryName (shortName C). When using it, type ObjectID.country

locality

public static ObjectID locality
Creates an ObjectID for the X.500 attribute type localityName (shortName L). When using it, type ObjectID.locality

stateOrProvince

public static ObjectID stateOrProvince
Creates an ObjectID for the X.500 attribute type stateOrProvinceName (shortName ST). When using it, type ObjectID.stateOrProvince

streetAddress

public static ObjectID streetAddress
Creates an ObjectID for the X.500 attribute type streetAddress (shortName STREET). When using it, type ObjectID.streetAddress

organization

public static ObjectID organization
Creates an ObjectID for the X.500 attribute type organizationName (shortName O). When using it, type ObjectID.organization

organizationalUnit

public static ObjectID organizationalUnit
Creates an ObjectID for the X.500 attribute type organizationalUnitName (shortName OU). When using it, type ObjectID.organizationalUnit

title

public static ObjectID title
Creates an ObjectID for the X.500 attribute type title (shortName T). When using it, type ObjectID.title

surName

public static ObjectID surName
Creates an ObjectID for the x.500 attribute type surname (shortName SN), added by Telia. When using it, type ObjectID.surName

givenName

public static ObjectID givenName
Creates an ObjectID for the x.500 attribute type givenName, added by Telia. When using it, type ObjectID.givenName.

initials

public static ObjectID initials
Creates an ObjectID for the x.500 attribute type initials. When using it, type ObjectID.initials

generationQualifier

public static ObjectID generationQualifier
Creates an ObjectID for the x.500 attribute type generationQualifier. When using it, type ObjectID.generationQualifier.

uniqueIdentifier

public static ObjectID uniqueIdentifier
Creates an ObjectID for the x.500 attribute type uniqueIdentifier, added by Telia. When using it, type ObjectID.uniqueIdentifier.

dnQualifier

public static ObjectID dnQualifier
Creates an ObjectID for the x.500 attribute type dnQualifier (distinguished name qualifier). When using it, type ObjectID.dnQualifier.

domainComponent

public static ObjectID domainComponent
Creates an ObjectID for the x.500 attribute type domainComponent (shortName DC), as defined by RFC 2247. When using it, type ObjectID.domainComponent.

caIssuers

public static ObjectID caIssuers
Creates an ObjectID for the x.509 AccessDescription access method caIssuers, as defined by RFC 2459. When using it, type ObjectID.caIssuers.

pkcs7

public static ObjectID pkcs7
Creates an ObjectID for the PKCS#7 object PKCS#7. When using it, type ObjectID.pkcs7

pkcs7_data

public static ObjectID pkcs7_data
Creates an ObjectID for the PKCS#7 object PKCS#7 data. When using it, type ObjectID.pkcs7_data

pkcs7_signedData

public static ObjectID pkcs7_signedData
Creates an ObjectID for the PKCS#7 object PKCS#7 signedData. When using it, type ObjectID.pkcs7_signedData

pkcs7_envelopedData

public static ObjectID pkcs7_envelopedData
Creates an ObjectID for the PKCS#7 object PKCS#7 envelopedData. When using it, type ObjectID.pkcs7_envelopedData

pkcs7_signedAndEnvelopedData

public static ObjectID pkcs7_signedAndEnvelopedData
Creates an ObjectID for the PKCS#7 object PKCS#7 signedAndEnvelopedData. When using it, type ObjectID.pkcs7_signedAndEnvelopedData

pkcs7_digestedData

public static ObjectID pkcs7_digestedData
Creates an ObjectID for the PKCS#7 object PKCS#7 digestedData. When using it, type ObjectID.pkcs7_digestedData

pkcs7_encryptedData

public static ObjectID pkcs7_encryptedData
Creates an ObjectID for the PKCS#7 object PKCS#7 encryptedData. When using it, type ObjectID.pkcs7_encryptedData

emailAddress

public static ObjectID emailAddress
Creates an ObjectID for the PKCS#9 object emailAddress (shortName EMAIL). When using it, type ObjectID.emailAddress

unstructuredName

public static ObjectID unstructuredName
Creates an ObjectID for the PKCS#9 object unstructeredName. When using it, type ObjectID.unstructeredName

contentType

public static ObjectID contentType
Creates an ObjectID for the PKCS#9 object contentType. When using it, type ObjectID.contentType

messageDigest

public static ObjectID messageDigest
Creates an ObjectID for the PKCS#9 object messageDigest. When using it, type ObjectID.messageDigest

signingTime

public static ObjectID signingTime
Creates an ObjectID for the PKCS#9 object signingTime. When using it, type ObjectID.signingTime

countersignature

public static ObjectID countersignature
Creates an ObjectID for the PKCS#9 object countersignature. When using it, type ObjectID.countersignature

challengePassword

public static ObjectID challengePassword
Creates an ObjectID for the PKCS#9 object challengePassword. When using it, type ObjectID.challengePassword

unstructuredAddress

public static ObjectID unstructuredAddress
Creates the PKCS#9 ObjectID unstructeredAddress. When using it, type ObjectID.unstructeredAddress

extendedCertificateAttributes

public static ObjectID extendedCertificateAttributes
Creates an ObjectID for the PKCS#9 object extendedCertificateAttributes. When using it, type ObjectID.extendedCertificateAttributes

signingDescription

public static ObjectID signingDescription
Creates an ObjectID for the PKCS#9 object signingDescription. When using it, type ObjectID.signingDescription

symmetricCapabilities

public static ObjectID symmetricCapabilities
Creates an ObjectID for the PKCS#9 object symmetricCapabilities. When using it, type ObjectID.symmetricCapabilities

friendlyName

public static ObjectID friendlyName
Creates an ObjectID for the PKCS#9 object friendlyName. When using it, type ObjectID.friendlyName

localKeyID

public static ObjectID localKeyID
Creates an ObjectID for the PKCS#9 object localKeyID. When using it, type ObjectID.localKeyID

certTypes

public static ObjectID certTypes
Creates an ObjectID for the PKCS#9 object certTypes. When using it, type ObjectID.certTypes

x509Certificate

public static ObjectID x509Certificate
Creates an ObjectID for the PKCS#9 object x509Certificate. When using it, type ObjectID.x509Certificate

sdsiCertificate

public static ObjectID sdsiCertificate
Creates an ObjectID for the PKCS#9 object sdsiCertificate. When using it, type ObjectID.sdsiCertificate

crlTypes

public static ObjectID crlTypes
Creates an ObjectID for the PKCS#9 object crlTypes. When using it, type ObjectID.crlTypes

x509Crl

public static ObjectID x509Crl
Creates an ObjectID for the PKCS#9 object x509Crl. When using it, type ObjectID.x509Crl

pkcs12_CertBagIds

public static ObjectID pkcs12_CertBagIds
Creates an ObjectID for the PKCS#12 object PKCS#12 CertBagIds When using it, type ObjectID.pkcs12_CertBagIds

pkcs12_x509CertCRLBagId

public static ObjectID pkcs12_x509CertCRLBagId
Creates an ObjectID for the PKCS#12 object PKCS#12 x509CertCRLBagId. When using it, type ObjectID.pkcs12_x509CertCRLBagId

pkcs12_SDSICertBagId

public static ObjectID pkcs12_SDSICertBagId
Creates an ObjectID for the PKCS#12 object PKCS#12 SDSICertBagId. When using it, type ObjectID.pkcs12_SDSICertBagId

pkcs12_Version1

public static ObjectID pkcs12_Version1
Creates an ObjectID for the PKCS#12 object PKCS#12 Version1. When using it, type ObjectID.pkcs12_Version1

pkcs12_Version1_BagIds

public static ObjectID pkcs12_Version1_BagIds
Creates an ObjectID for the PKCS#12 object PKCS#12 Version1 BagIds. When using it, type ObjectID.pkcs12_Version1_BagIds

pkcs12_keyBag

public static ObjectID pkcs12_keyBag
Creates an ObjectID for the PKCS#12 object PKCS#12 keyBag. When using it, type ObjectID.pkcs12_keyBag

pkcs12_pkcs8ShroudedKeyBag

public static ObjectID pkcs12_pkcs8ShroudedKeyBag
Creates an ObjectID for the PKCS#12 object PKCS#12 pkcs8ShroudedKeyBag. When using it, type ObjectID.pkcs12_pkcs8ShroudedKeyBag

pkcs12_certBag

public static ObjectID pkcs12_certBag
Creates an ObjectID for the PKCS#12 object PKCS#12 certBag. When using it, type ObjectID.pkcs12_certBag

pkcs12_crlBag

public static ObjectID pkcs12_crlBag
Creates an ObjectID for the PKCS#12 object PKCS#12 crlBag. When using it, type ObjectID.pkcs12_crlBag

pkcs12_secretBag

public static ObjectID pkcs12_secretBag
Creates an ObjectID for the PKCS#12 object PKCS#12 secretBag. When using it, type ObjectID.pkcs12_secretBag

pkcs12_safeContentsBag

public static ObjectID pkcs12_safeContentsBag
Creates an ObjectID for the PKCS#12 object PKCS#12 safeContentsBag. When using it, type ObjectID.pkcs12_safeContentsBag

id_pkix_cps

public static ObjectID id_pkix_cps
Creates an ObjectID for the PKIX object id-pkix-cps indicating a CPS Pointer qualifier for defining a (URI) pointer to a Certification Practice Statement (CPS) describing a particular CA policy.

When using it, type ObjectID.id_pkix_cps


id_pkix_unotice

public static ObjectID id_pkix_unotice
Creates an ObjectID for the PKIX object id-pkix-unotice indicating a User Notice qualifier for describing a particular CA policy.

When using it, type ObjectID.id_pkix_unotice


netscape

public static ObjectID netscape
The Netscape base object identifier. When using it, type ObjectID.netscape.

netscapeCertSequence

public static ObjectID netscapeCertSequence
The Netscape cert seequence object identifier. When using it, type ObjectID.netscapeCertSequence.
Constructor Detail

ObjectID

protected ObjectID()
The default constructor.

ObjectID

public ObjectID(java.lang.String oid)
Constructs an ObjectID from a String. If a name already has been registered for the given ObjectID, it will be cleared when calling this method. If a shortName has been registered, it will be cleared.
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"

ObjectID

public ObjectID(java.lang.String oid,
                java.lang.String name)
Constructs an ObjectID from a String representation and a String name. If a name already has been registered for the given ObjectID, it will be replaced when calling this method. If a shortName has been registered, it will be cleared. Use the hasRegisteredName method for querying if a name for the particular oid already has been registered, e.g.:
 String oidStr = "9.5.12345.17.8";
 String name = "myObjectID";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name); 
 }   
 
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"
name - a name for the objectID

ObjectID

public ObjectID(java.lang.String oid,
                java.lang.String name,
                java.lang.String shortName)
Constructs an ObjectID from a String representation, a String name, and a String shortName. If a name already has been registered for the given ObjectID, it will be replaced when calling this method. If a shortName has been registered, it also will be replaced. Use the hasRegisteredName method for querying if a name for the particular oid already has been registered, e.g.:
 String oidStr = "9.5.12345.17.8";
 String name = "myObjectID";
 String shortName = "mO";
 ObjectID oid = null;
 if (!ObjectID.hasRegisteredName(oidStr)) {
   oid = new ObjectID(oidStr, name, shortName); 
 }   
 
Parameters:
oid - the objectID as String, e.g. "1.2.3.4"
name - a name for the objectID, e.g. "commonName"
shortName - a short name for the objectID e.g. "CN"
Method Detail

hasRegisteredName

public static boolean hasRegisteredName(java.lang.String oid)
Looks if a name for the object identifier specified by the given OID string already is registered.
Parameters:
oid - the OID-String specifying the object identifier to be looked for, e.g. "1.2.4.5"
Returns:
true if a name for the object identifier with this OID specification already is registered, false otherwise

getInstance

public static ObjectID getInstance(java.lang.String name)
This method is responsible for returning an ObjectID given either the registered name or the short name of any existing OID that has already been registered. It will also be case-insensitive with regards to all name comparisons.

getValue

public java.lang.Object getValue()
Returns the value of this ObjectID as a String object.
Overrides:
getValue in class ASN1Object
Returns:
the value of this ObjectID as a String object

setValue

public void setValue(java.lang.Object object)
Sets the value of this object to value (e.g. "1.2.3.4"). The supplied value has to be a OID string like, for instance, "1.2.3.4".
Overrides:
setValue in class ASN1Object
Parameters:
object - the value (na OID string) to be set for this ObjectID

getID

public java.lang.String getID()
Returns the objectID as string.
Returns:
the objectID as String ("1.2.3.4")

getName

public java.lang.String getName()
Returns the name registered for this ObjectID or the object identifier if there is no name registered.
Returns:
the name of the ObjectID; if no name is registered, the OID string is returned

getShortName

public java.lang.String getShortName()
Returns the short name registered for this ObjectID. If no shortName is registered, but a name is registered, the name is returned. If no shortName is registered, and no name is registered, the OID string is returned.
Returns:
the short name of the ObjectID; if no shortName is registered the name - if registered - or the OID string is returned

hashCode

public int hashCode()
Returns a hash code for this object.
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code

equals

public boolean equals(java.lang.Object obj)
Compares this ObjectID to the specified object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - - the object to compare this ObjectID against.
Returns:
true, if the object is equal to this ObjectID false otherwise

encode

protected void encode(java.io.OutputStream os)
               throws java.io.IOException
DER encodes this OBjectID ASN1Object and writes the result to given OutputStream.
Overrides:
encode in class ASN1Object
Parameters:
os - the output stream to which to write the encoded data
Throws:
java.io.IOException - if an error occurs while writing to the stream

decode

protected void decode(int length,
                      java.io.InputStream is)
               throws java.io.IOException
Decodes the next available data from the InputStream.
Overrides:
decode in class ASN1Object
Parameters:
length - the length of the ASN1Object which shall be decoded
is - the input stream from which the DER encoded data is read in
Throws:
java.io.IOException - if there is a problem with the InputStream

toString

public java.lang.String toString()
Returns a string that represents the contents of the ObjectID.
Overrides:
toString in class ASN1Object
Returns:
the string representation
See Also:
ASN1Object.toString()