Package org.bouncycastle.asn1
Class ASN1ApplicationSpecific
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1Primitive
org.bouncycastle.asn1.ASN1TaggedObject
org.bouncycastle.asn1.ASN1ApplicationSpecific
- All Implemented Interfaces:
ASN1ApplicationSpecificParser,ASN1Encodable,ASN1TaggedObjectParser,InMemoryRepresentable,Encodable
- Direct Known Subclasses:
BERApplicationSpecific,DERApplicationSpecific,DLApplicationSpecific
public abstract class ASN1ApplicationSpecific
extends ASN1TaggedObject
implements ASN1ApplicationSpecificParser
Deprecated.
Base class for an ASN.1 ApplicationSpecific object
-
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.Return the tag number associated with this object,byte[]Deprecated.Return the contents of this object as a byte[]Deprecated.Return the enclosed object assuming explicit tagging.static ASN1ApplicationSpecificgetInstance(Object obj) Deprecated.Return an ASN1ApplicationSpecific from the passed in object, which may be a byte array, or null.getObject(int tagNo) Deprecated.Return the enclosed object assuming implicit tagging.getObjectParser(int tag, boolean isExplicit) Deprecated.Return a parser for the actual object tagged.Deprecated.ASN1ApplicationSpecific uses an internal ASN1TaggedObject for the implementation, and will soon be deprecated in favour of using ASN1TaggedObject with a tag class ofBERTags.APPLICATION.booleanhasApplicationTag(int tagNo) Deprecated.booleanhasContextTag(int tagNo) Deprecated.booleanDeprecated.Return true if the object is marked as constructed, false otherwise.parseBaseUniversal(boolean declaredExplicit, int baseTagNo) Deprecated.Deprecated.Needed for open types, until we have better type-guided parsing support.Deprecated.parseImplicitBaseTagged(int baseTagClass, int baseTagNo) Deprecated.Deprecated.Read the next object in the parser.Methods inherited from class org.bouncycastle.asn1.ASN1TaggedObject
getBaseObject, getBaseUniversal, getExplicitBaseObject, getExplicitBaseTagged, getImplicitBaseTagged, getInstance, getLoadedObject, getObject, getTagClass, getTagNo, hashCode, hasTag, isExplicit, toStringMethods inherited from class org.bouncycastle.asn1.ASN1Primitive
encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1PrimitiveMethods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bouncycastle.asn1.ASN1Encodable
toASN1PrimitiveMethods inherited from interface org.bouncycastle.asn1.ASN1TaggedObjectParser
getTagClass, getTagNo, hasTagMethods inherited from interface org.bouncycastle.asn1.InMemoryRepresentable
getLoadedObject
-
Method Details
-
getInstance
Deprecated.Return an ASN1ApplicationSpecific from the passed in object, which may be a byte array, or null.- Parameters:
obj- the object to be converted.- Returns:
- obj's representation as an ASN1ApplicationSpecific object.
-
getApplicationTag
public int getApplicationTag()Deprecated.Return the tag number associated with this object,- Returns:
- the application tag number.
-
getContents
public byte[] getContents()Deprecated.Return the contents of this object as a byte[]- Returns:
- the encoded contents of the object.
-
getEnclosedObject
Deprecated.Return the enclosed object assuming explicit tagging.- Returns:
- the resulting object
- Throws:
IOException- if reconstruction fails.
-
getObject
Deprecated.Return the enclosed object assuming implicit tagging.- Parameters:
tagNo- the type tag that should be applied to the object's contents.- Returns:
- the resulting object
- Throws:
IOException- if reconstruction fails.
-
getObjectParser
Deprecated.Description copied from interface:ASN1TaggedObjectParserReturn a parser for the actual object tagged.- Specified by:
getObjectParserin interfaceASN1TaggedObjectParser- Overrides:
getObjectParserin classASN1TaggedObject- 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:
IOException- if a parser cannot be constructed.
-
parseBaseUniversal
Deprecated.- Specified by:
parseBaseUniversalin interfaceASN1TaggedObjectParser- Overrides:
parseBaseUniversalin classASN1TaggedObject- Throws:
IOException
-
parseExplicitBaseObject
Deprecated.Description copied from interface:ASN1TaggedObjectParserNeeded for open types, until we have better type-guided parsing support. Use sparingly for other purposes, and preferASN1TaggedObjectParser.parseExplicitBaseTagged()orASN1TaggedObjectParser.parseBaseUniversal(boolean, int)where possible. Before using, check for matching tagclassandnumber.- Specified by:
parseExplicitBaseObjectin interfaceASN1TaggedObjectParser- Overrides:
parseExplicitBaseObjectin classASN1TaggedObject- Throws:
IOException
-
parseExplicitBaseTagged
Deprecated.- Specified by:
parseExplicitBaseTaggedin interfaceASN1TaggedObjectParser- Overrides:
parseExplicitBaseTaggedin classASN1TaggedObject- Throws:
IOException
-
parseImplicitBaseTagged
public ASN1TaggedObjectParser parseImplicitBaseTagged(int baseTagClass, int baseTagNo) throws IOException Deprecated.- Specified by:
parseImplicitBaseTaggedin interfaceASN1TaggedObjectParser- Overrides:
parseImplicitBaseTaggedin classASN1TaggedObject- Throws:
IOException
-
hasApplicationTag
public boolean hasApplicationTag(int tagNo) Deprecated. -
hasContextTag
public boolean hasContextTag(int tagNo) Deprecated.- Specified by:
hasContextTagin interfaceASN1TaggedObjectParser- Overrides:
hasContextTagin classASN1TaggedObject
-
getTaggedObject
Deprecated.ASN1ApplicationSpecific uses an internal ASN1TaggedObject for the implementation, and will soon be deprecated in favour of using ASN1TaggedObject with a tag class ofBERTags.APPLICATION. This method lets you get the internal ASN1TaggedObject so that client code can begin the migration. -
isConstructed
public boolean isConstructed()Deprecated.Return true if the object is marked as constructed, false otherwise.- Returns:
- true if constructed, otherwise false.
-
readObject
Deprecated.Description copied from interface:ASN1ApplicationSpecificParserRead the next object in the parser.- Specified by:
readObjectin interfaceASN1ApplicationSpecificParser- Returns:
- an ASN1Encodable
- Throws:
IOException- on a parsing or decoding error.
-
ASN1TaggedObjectonly, testing for the expectedtag classofBERTags.APPLICATIONin relevant objects before using. If using astream parser, handle application-tagged objects usingASN1TaggedObjectParserin the usual way, again testing for atag classofBERTags.APPLICATION.