Home » geronimo-2.2-source-release » org.apache.geronimo.crypto.asn1 » [javadoc | source]
org.apache.geronimo.crypto.asn1
abstract public class: ASN1TaggedObject [javadoc | source]
java.lang.Object
   org.apache.geronimo.crypto.asn1.ASN1Encodable
      org.apache.geronimo.crypto.asn1.DERObject
         org.apache.geronimo.crypto.asn1.ASN1TaggedObject

All Implemented Interfaces:
    DERTags, DEREncodable

Direct Known Subclasses:
    DERTaggedObject, BERTaggedObject

ASN.1 TaggedObject - in ASN.1 nottation this is any object proceeded by a [n] where n is some number - these are assume to follow the construction rules (as with sequences).
Field Summary
 int tagNo     
 boolean empty     
 boolean explicit     
 DEREncodable obj     
Constructor:
 public ASN1TaggedObject(int tagNo,
    DEREncodable obj) 
    Create a tagged object in the explicit style.
    Parameters:
    tagNo - the tag number for this object.
    obj - the tagged object.
 public ASN1TaggedObject(boolean explicit,
    int tagNo,
    DEREncodable obj) 
    Create a tagged object with the style given by the value of explicit.

    If the object implements ASN1Choice the tag style will always be changed to explicit in accordance with the ASN.1 encoding rules.

    Parameters:
    explicit - true if the object is explicitly tagged.
    tagNo - the tag number for this object.
    obj - the tagged object.
Method from org.apache.geronimo.crypto.asn1.ASN1TaggedObject Summary:
encode,   equals,   getInstance,   getObject,   getTagNo,   hashCode,   isEmpty,   isExplicit
Methods from org.apache.geronimo.crypto.asn1.DERObject:
encode,   equals,   hashCode,   toASN1Object
Methods from org.apache.geronimo.crypto.asn1.ASN1Encodable:
equals,   getDERObject,   getEncoded,   hashCode,   toASN1Object
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.crypto.asn1.ASN1TaggedObject Detail:
 abstract  void encode(DEROutputStream out) throws IOException
 public boolean equals(Object o) 
 public static ASN1TaggedObject getInstance(ASN1TaggedObject obj,
    boolean explicit) 
 public DERObject getObject() 
    return whatever was following the tag.

    Note: tagged objects are generally context dependent if you're trying to extract a tagged object you should be going via the appropriate getInstance method.

 public int getTagNo() 
 public int hashCode() 
 public boolean isEmpty() 
 public boolean isExplicit() 
    return whether or not the object may be explicitly tagged.

    Note: if the object has been read from an input stream, the only time you can be sure if isExplicit is returning the true state of affairs is if it returns false. An implicitly tagged object may appear to be explicitly tagged, so you need to understand the context under which the reading was done as well, see getObject below.