|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--codec.asn1.ASN1AbstractType
|
+--codec.asn1.ASN1TaggedType
Represents an ASN.1 tagged type. Tagged types are types that modify the tag
of an underlying type. The ASN.1 type classes
CONTEXT, PRIVATE, and
APPLICATION specify tagged types.
| Constructor Summary | |
ASN1TaggedType(int tag,
ASN1Type inner,
boolean explicit)
Creates an instance with the given tag and inner type. |
|
ASN1TaggedType(int tag,
ASN1Type inner,
boolean explicit,
boolean optional)
Creates an instance with the given tag, tag class, and inner type. |
|
ASN1TaggedType(int tag,
int cls,
ASN1Type inner,
boolean explicit)
Creates an instance with the given tag, tag class, and inner type. |
|
| Method Summary | |
void |
decode(Decoder dec)
|
void |
encode(Encoder enc)
|
ASN1Type |
getInnerType()
Returns the underlying ASN.1 type. |
int |
getTag()
Returns the tag of this type. |
int |
getTagClass()
Returns the tag class of this type. |
Object |
getValue()
Returns the value of the inner type. |
boolean |
isExplicit()
Tagged types themselves are always tagged EXPLICIT. |
void |
setExplicit(boolean explicit)
Throws an exception if the give tagging type is not EXPLICIT ( true).
|
void |
setInnerType(ASN1Type t)
Sets the inner type of this CONTEXT SPECIFIC type. |
void |
setTag(int tag)
Sets the tag of this type. |
void |
setTagClass(int cls)
Sets the tag class of this type. |
String |
toString()
|
| Methods inherited from class codec.asn1.ASN1AbstractType |
checkConstraints, getConstraint, isOptional, isType, readExternal, setConstraint, setOptional, writeExternal |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ASN1TaggedType(int tag,
int cls,
ASN1Type inner,
boolean explicit)
explicit is
true and IMPLICIT otherwise.tag - The tag of this type.cls - The tag class of this type, for instance
CONTEXT SPECIFIC.inner - The inner type of this tagged type.explicit - true if EXPLICIT tagging shall be used and
false if the tagging method shall be
IMPLICIT.NullPointerException - if the given inner type is null.
public ASN1TaggedType(int tag,
ASN1Type inner,
boolean explicit)
explicit is true and
IMPLICIT otherwise. The tag class is set to CONTEXT SPECIFIC.tag - The tag of this type.inner - The inner type of this tagged type.explicit - true if EXPLICIT tagging shall be used and
false if the tagging method shall be
IMPLICIT.NullPointerException - if the given inner type is null.
public ASN1TaggedType(int tag,
ASN1Type inner,
boolean explicit,
boolean optional)
explicit is
true and IMPLICIT otherwise. The tag class is set to
CONTEXT SPECIFIC. If
optional
is true then this type is declared OPTIONAL.tag - The tag of this type.inner - The inner type of this tagged type.explicit - true if EXPLICIT tagging shall be used and
false if the tagging method shall be
IMPLICIT.optional - true declares this type as OPTIONAL.NullPointerException - if the given inner type is null.| Method Detail |
public ASN1Type getInnerType()
setOptional method.public Object getValue()
ASN1Null. This method calls
getValue on the inner type and returns the
result.getValue in class ASN1AbstractTypepublic void setInnerType(ASN1Type t)
t - The type to set as the inner type.NullPointerException - if the given type is null.public void setTag(int tag)
tag - The tag.public int getTag()
getTag in class ASN1AbstractTypepublic void setTagClass(int cls)
UNIVERSAL, CONTEXT SPECIFIC, PRIVATE, or APPLICATION.cls - The tag class.public int getTagClass()
CONTEXT SPECIFIC.getTagClass in class ASN1AbstractTypepublic boolean isExplicit()
isExplicit in class ASN1AbstractTypetrue, tagged types themselves are always tagged
EXPLICIT.public void setExplicit(boolean explicit)
true).
Tagged types themselves are always EXPLICIT; re-tagging tagged types is
very bad style!setExplicit in class ASN1AbstractTypeexplicit - The tagging method of the tagged (outer) type. This should
not be mixed with the tagging method of the inner type
which can be tagged either EXPLICIT or IMPLICIT.
public void encode(Encoder enc)
throws ASN1Exception,
IOException
encode in class ASN1AbstractType
public void decode(Decoder dec)
throws ASN1Exception,
IOException
decode in class ASN1AbstractTypepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||