Class BERTaggedObjectParser

java.lang.Object
org.bouncycastle.asn1.BERTaggedObjectParser
All Implemented Interfaces:
ASN1Encodable, ASN1TaggedObjectParser, InMemoryRepresentable

public class BERTaggedObjectParser extends Object implements ASN1TaggedObjectParser
Parser for indefinite-length tagged objects.
  • Method Details

    • isConstructed

      public boolean isConstructed()
      Return true if this tagged object is marked as constructed.
      Returns:
      true if constructed, false otherwise.
    • getTagNo

      public int getTagNo()
      Return the tag number associated with this object.
      Specified by:
      getTagNo in interface ASN1TaggedObjectParser
      Returns:
      the tag number.
    • getObjectParser

      public ASN1Encodable getObjectParser(int tag, boolean isExplicit) throws IOException
      Return an object parser for the contents of this tagged object.
      Specified by:
      getObjectParser in interface ASN1TaggedObjectParser
      Parameters:
      tag - the actual tag number of the object (needed if implicit).
      isExplicit - true if the contained object was explicitly tagged, false if implicit.
      Returns:
      an ASN.1 encodable object parser.
      Throws:
      IOException - if there is an issue building the object parser from the stream.
    • getLoadedObject

      public ASN1Primitive getLoadedObject() throws IOException
      Return an in-memory, encodable, representation of the tagged object.
      Specified by:
      getLoadedObject in interface InMemoryRepresentable
      Returns:
      an ASN1TaggedObject.
      Throws:
      IOException - if there is an issue loading the data.
    • toASN1Primitive

      public ASN1Primitive toASN1Primitive()
      Return an ASN1TaggedObject representing this parser and its contents.
      Specified by:
      toASN1Primitive in interface ASN1Encodable
      Returns:
      an ASN1TaggedObject