|
Bouncy Castle Cryptography Library 1.37 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.asn1.ASN1Encodable
org.bouncycastle.asn1.DERObject
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1TaggedObject
public abstract class ASN1TaggedObject
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).
Field Summary |
---|
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable |
---|
BER, DER |
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)
Create a tagged object with the style given by the value of explicit. |
|
ASN1TaggedObject(int tagNo,
DEREncodable obj)
Create a tagged object in the explicit style. |
Method Summary | |
---|---|
static ASN1TaggedObject |
getInstance(ASN1TaggedObject obj,
boolean explicit)
|
static ASN1TaggedObject |
getInstance(java.lang.Object obj)
|
DERObject |
getObject()
return whatever was following the tag. |
DEREncodable |
getObjectParser(int tag,
boolean isExplicit)
Return the object held in this tagged object as a parser assuming it has the type of the passed in tag. |
int |
getTagNo()
|
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isExplicit()
return whether or not the object may be explicitly tagged. |
java.lang.String |
toString()
|
Methods inherited from class org.bouncycastle.asn1.ASN1Object |
---|
equals, fromByteArray |
Methods inherited from class org.bouncycastle.asn1.DERObject |
---|
toASN1Object |
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable |
---|
getDEREncoded, getDERObject, getEncoded, getEncoded |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.bouncycastle.asn1.DEREncodable |
---|
getDERObject |
Constructor Detail |
---|
public ASN1TaggedObject(int tagNo, DEREncodable obj)
tagNo
- the tag number for this object.obj
- the tagged object.public ASN1TaggedObject(boolean explicit, int tagNo, DEREncodable obj)
If the object implements ASN1Choice the tag style will always be changed to explicit in accordance with the ASN.1 encoding rules.
explicit
- true if the object is explicitly tagged.tagNo
- the tag number for this object.obj
- the tagged object.Method Detail |
---|
public static ASN1TaggedObject getInstance(ASN1TaggedObject obj, boolean explicit)
public static ASN1TaggedObject getInstance(java.lang.Object obj)
public int hashCode()
hashCode
in class ASN1Object
public int getTagNo()
getTagNo
in interface ASN1TaggedObjectParser
public boolean isExplicit()
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.
public boolean isEmpty()
public DERObject getObject()
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.
public DEREncodable getObjectParser(int tag, boolean isExplicit)
getObjectParser
in interface ASN1TaggedObjectParser
public java.lang.String toString()
toString
in class java.lang.Object
|
Bouncy Castle Cryptography Library 1.37 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |