Package org.bouncycastle.asn1
Interface ASN1TaggedObjectParser
-
- All Superinterfaces:
ASN1Encodable,InMemoryRepresentable
- All Known Subinterfaces:
ASN1ApplicationSpecificParser
- All Known Implementing Classes:
ASN1ApplicationSpecific,ASN1TaggedObject,BERApplicationSpecific,BERApplicationSpecificParser,BERTaggedObject,BERTaggedObjectParser,DERApplicationSpecific,DERTaggedObject,DLApplicationSpecific,DLTaggedObject
public interface ASN1TaggedObjectParser extends ASN1Encodable, InMemoryRepresentable
Interface for the parsing of a generic tagged ASN.1 object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ASN1EncodablegetObjectParser(int tag, boolean isExplicit)Deprecated.This parser now includes thetag class.intgetTagClass()Return the tag class associated with this object.intgetTagNo()Return the tag number associated with this object.booleanhasContextTag(int tagNo)booleanhasTag(int tagClass, int tagNo)ASN1EncodableparseBaseUniversal(boolean declaredExplicit, int baseTagNo)ASN1EncodableparseExplicitBaseObject()Needed for open types, until we have better type-guided parsing support.ASN1TaggedObjectParserparseExplicitBaseTagged()ASN1TaggedObjectParserparseImplicitBaseTagged(int baseTagClass, int baseTagNo)-
Methods inherited from interface org.bouncycastle.asn1.ASN1Encodable
toASN1Primitive
-
Methods inherited from interface org.bouncycastle.asn1.InMemoryRepresentable
getLoadedObject
-
-
-
-
Method Detail
-
getTagClass
int getTagClass()
Return the tag class associated with this object.- Returns:
- the tag class.
-
getTagNo
int getTagNo()
Return the tag number associated with this object.- Returns:
- the tag number.
-
hasContextTag
boolean hasContextTag(int tagNo)
-
hasTag
boolean hasTag(int tagClass, int tagNo)
-
getObjectParser
ASN1Encodable getObjectParser(int tag, boolean isExplicit) throws java.io.IOException
Deprecated.This parser now includes thetag class. This method will raise an exception if it is notBERTags.CONTEXT_SPECIFIC. UseASN1Util.parseBaseUniversal(ASN1TaggedObjectParser, int, int, boolean, int)as a direct replacement, or useparseBaseUniversal(boolean, int)only after confirming the expected tag class (e.g.ASN1Util.tryParseContextBaseUniversal(ASN1TaggedObjectParser, int, boolean, int).Return a parser for the actual object tagged.- Parameters:
tag- the primitive tag value for the object tagged originally.isExplicit- true if the tagging was done explicitly.- Returns:
- a parser for the tagged object.
- Throws:
java.io.IOException- if a parser cannot be constructed.
-
parseBaseUniversal
ASN1Encodable parseBaseUniversal(boolean declaredExplicit, int baseTagNo) throws java.io.IOException
- Throws:
java.io.IOException
-
parseExplicitBaseObject
ASN1Encodable parseExplicitBaseObject() throws java.io.IOException
Needed for open types, until we have better type-guided parsing support. Use sparingly for other purposes, and preferparseExplicitBaseTagged()orparseBaseUniversal(boolean, int)where possible. Before using, check for matching tagclassandnumber.- Throws:
java.io.IOException
-
parseExplicitBaseTagged
ASN1TaggedObjectParser parseExplicitBaseTagged() throws java.io.IOException
- Throws:
java.io.IOException
-
parseImplicitBaseTagged
ASN1TaggedObjectParser parseImplicitBaseTagged(int baseTagClass, int baseTagNo) throws java.io.IOException
- Throws:
java.io.IOException
-
-