public abstract class ASN1ApplicationSpecific extends ASN1Primitive implements ASN1ApplicationSpecificParser
| Modifier and Type | Method and Description |
|---|---|
int |
getApplicationTag()
Return the tag number associated with this object,
|
byte[] |
getContents()
Return the contents of this object as a byte[]
|
ASN1Primitive |
getEnclosedObject()
Return the enclosed object assuming explicit tagging.
|
static ASN1ApplicationSpecific |
getInstance(java.lang.Object obj)
Return an ASN1ApplicationSpecific from the passed in object, which may be a byte array, or null.
|
ASN1Primitive |
getLoadedObject()
Get the in-memory representation of the ASN.1 object.
|
ASN1Primitive |
getObject()
Deprecated.
Will be removed. Use
getEnclosedObject() instead. |
ASN1Primitive |
getObject(int tagNo)
Return the enclosed object assuming implicit tagging.
|
ASN1Encodable |
getObjectParser(int tag,
boolean isExplicit)
Return a parser for the actual object tagged.
|
int |
getTagClass()
Return the tag class associated with this object.
|
ASN1TaggedObject |
getTaggedObject()
ASN1ApplicationSpecific uses an internal ASN1TaggedObject for the
implementation, and will soon be deprecated in favour of using
ASN1TaggedObject with a tag class of
BERTags.APPLICATION. |
int |
getTagNo()
Return the tag number associated with this object.
|
boolean |
hasApplicationTag(int tagNo) |
boolean |
hasContextTag(int tagNo) |
int |
hashCode() |
boolean |
hasTag(int tagClass,
int tagNo) |
boolean |
isConstructed()
Return true if the object is marked as constructed, false otherwise.
|
ASN1Encodable |
parseBaseUniversal(boolean declaredExplicit,
int baseTagNo) |
ASN1Encodable |
parseExplicitBaseObject()
Needed for open types, until we have better type-guided parsing support.
|
ASN1TaggedObjectParser |
parseExplicitBaseTagged() |
ASN1TaggedObjectParser |
parseImplicitBaseTagged(int baseTagClass,
int baseTagNo) |
ASN1Encodable |
readObject()
Read the next object in the parser.
|
encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1PrimitivegetEncoded, getEncoded, hasEncodedTagValueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waittoASN1Primitivepublic static ASN1ApplicationSpecific getInstance(java.lang.Object obj)
obj - the object to be converted.public int getApplicationTag()
public byte[] getContents()
public final ASN1Primitive getLoadedObject()
InMemoryRepresentablegetLoadedObject in interface InMemoryRepresentablepublic ASN1Primitive getObject() throws java.io.IOException
getEnclosedObject() instead.java.io.IOException - if reconstruction fails.public ASN1Primitive getEnclosedObject() throws java.io.IOException
java.io.IOException - if reconstruction fails.public ASN1Primitive getObject(int tagNo) throws java.io.IOException
tagNo - the type tag that should be applied to the object's contents.java.io.IOException - if reconstruction fails.public ASN1Encodable getObjectParser(int tag, boolean isExplicit) throws java.io.IOException
ASN1TaggedObjectParsergetObjectParser in interface ASN1TaggedObjectParsertag - the primitive tag value for the object tagged originally.isExplicit - true if the tagging was done explicitly.java.io.IOException - if a parser cannot be constructed.public ASN1Encodable parseBaseUniversal(boolean declaredExplicit, int baseTagNo) throws java.io.IOException
parseBaseUniversal in interface ASN1TaggedObjectParserjava.io.IOExceptionpublic ASN1Encodable parseExplicitBaseObject() throws java.io.IOException
ASN1TaggedObjectParserASN1TaggedObjectParser.parseExplicitBaseTagged() or ASN1TaggedObjectParser.parseBaseUniversal(boolean, int)
where possible. Before using, check for matching tag class and
number.parseExplicitBaseObject in interface ASN1TaggedObjectParserjava.io.IOExceptionpublic ASN1TaggedObjectParser parseExplicitBaseTagged() throws java.io.IOException
parseExplicitBaseTagged in interface ASN1TaggedObjectParserjava.io.IOExceptionpublic ASN1TaggedObjectParser parseImplicitBaseTagged(int baseTagClass, int baseTagNo) throws java.io.IOException
parseImplicitBaseTagged in interface ASN1TaggedObjectParserjava.io.IOExceptionpublic int getTagClass()
ASN1TaggedObjectParsergetTagClass in interface ASN1TaggedObjectParserpublic int getTagNo()
ASN1TaggedObjectParsergetTagNo in interface ASN1TaggedObjectParserpublic boolean hasApplicationTag(int tagNo)
public boolean hasContextTag(int tagNo)
hasContextTag in interface ASN1TaggedObjectParserpublic boolean hasTag(int tagClass,
int tagNo)
hasTag in interface ASN1TaggedObjectParserpublic ASN1TaggedObject getTaggedObject()
BERTags.APPLICATION. This method
lets you get the internal ASN1TaggedObject so that client code can begin the
migration.public int hashCode()
hashCode in class ASN1Primitivepublic boolean isConstructed()
public ASN1Encodable readObject() throws java.io.IOException
ASN1ApplicationSpecificParserreadObject in interface ASN1ApplicationSpecificParserjava.io.IOException - on a parsing or decoding error.