Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.27
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1
Class ASN1TaggedObject

    java.lang.Object
      |
      +--org.bouncycastle.asn1.ASN1Encodable
            |
            +--org.bouncycastle.asn1.DERObject
                  |
                  +--org.bouncycastle.asn1.ASN1TaggedObject

All Implemented Interfaces:
  DEREncodable, DERTags

Direct Known Subclasses:
  DERTaggedObject

public abstract class ASN1TaggedObject
extends DERObject

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).

Fields inherited from interface org.bouncycastle.asn1.DERTags
`APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IA5_STRING, INTEGER, NULL, NUMERIC_STRING, OBJECT_IDENTIFIER, OCTET_STRING, PRINTABLE_STRING, SEQUENCE, SEQUENCE_OF, SET, SET_OF, T61_STRING, TAGGED, UNIVERSAL_STRING, UTC_TIME, UTF8_STRING, VIDEOTEX_STRING, VISIBLE_STRING`

Constructor Summary
`ASN1TaggedObject(boolean explicit, int tagNo, DEREncodable obj)`
`ASN1TaggedObject(int tagNo, DEREncodable obj)`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`static ASN1TaggedObject` | `getInstance(ASN1TaggedObject obj, boolean explicit)`
`DERObject` | `getObject()` return whatever was following the tag.
`int` | `getTagNo()`
`int` | `hashCode()`
`boolean` | `isEmpty()`
`boolean` | `isExplicit()` return whether or not the object may be explicitly tagged.

Methods inherited from class org.bouncycastle.asn1.DERObject
`toASN1Object`

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
`getDERObject, getEncoded`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ASN1TaggedObject

    public ASN1TaggedObject(int tagNo,
                            DEREncodable obj)

  Parameters:
    `tagNo` - the tag number for this object.
    `obj` - the tagged object.

### ASN1TaggedObject

    public ASN1TaggedObject(boolean explicit,
                            int tagNo,
                            DEREncodable obj)

  Parameters:
    `explicit` - true if the object is explicitly tagged.
    `tagNo` - the tag number for this object.
    `obj` - the tagged object.

Method Detail

### getInstance

    public static ASN1TaggedObject getInstance(ASN1TaggedObject obj,
                                               boolean explicit)

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `DERObject`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `DERObject`

### getTagNo

    public int getTagNo()

### isExplicit

    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.

### isEmpty

    public boolean isEmpty()

### getObject

    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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.27
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD