|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasn.Tags
This class acts as a factory for ASN.1 tags. An ASN.1 tag consists of a class and a number and is used to identify an ASN.1 value.
The tags are internally packed in int values and must be
handled as opaque values that may be passed - after creation - to the
decoders/encoders.
Note: The predefined tag constants
(like BOOLEAN, INTEGER, ...) have a UNIVERSAL class, so
that they may be directly used instead of invoking the createTag method
with UNIVERSAL as first parameter.
ASN.1 defines the 4 following tag classes:
The tag numbers are restricted to values in the interval[0..MAX_TAG_NUMBER].
The getTagClass and getTagNumber
methods must be used to extract the corresponding tag class and tag number.
| Field Summary | |
static int |
APPLICATION
The ASN.1 APPLICATION class. |
static int |
BIT_STRING
The universal tag for a BIT STRING value. |
static int |
BMPSTRING
The universal tag for a BMPString value. |
static int |
BOOLEAN
The universal tag for a BOOLEAN value. |
static int |
CONTEXT
The ASN.1 CONTEXT class. |
static int |
EMBEDDED_PDV
The universal tag for an EMBEDDED PDV value. |
static int |
ENUMERATED
The universal tag for an ENUMERATED value. |
static int |
EOC
The End of Content tag. |
static int |
EXTERNAL
The universal tag for an EXTERNAL value. |
static int |
GENERALIZEDTIME
The universal tag for a GeneralizedTime value. |
static int |
GENERALSTRING
The universal tag for a GeneralString value. |
static int |
GRAPHICSTRING
The universal tag for a GraphicString value. |
static int |
IA5STRING
The universal tag for an IA5String value. |
static int |
INTEGER
The universal tag for an INTEGER value. |
static int |
MAX_TAG_NUMBER
The maximum value allowed for a tag number. |
static int |
NULL
The universal tag for a NULL value. |
static int |
NUMERICSTRING
The universal tag for a NumericString value. |
static int |
OBJECT_DESCRIPTOR
The universal tag for an OBJECT DESCRIPTOR value. |
static int |
OBJECT_IDENTIFIER
The universal tag for an OBJECT IDENTIFIER value. |
static int |
OCTET_STRING
The universal tag for an OCTET STRING value. |
static int |
PRINTABLESTRING
The universal tag for a PrintableString value. |
static int |
PRIVATE
The ASN.1 PRIVATE class. |
static int |
REAL
The universal tag for a REAL value. |
static int |
SEQUENCE
The universal tag for a SEQUENCE/SEQUENCE OF value. |
static int |
SET
The universal tag for a SET/SET OF value. |
static int |
T61STRING
The universal tag for a T61String value. |
static int |
TELETEXSTRING
The universal tag for a TeletexString value. |
static int |
UNIVERSAL
The ASN.1 UNIVERSAL class. |
static int |
UNIVERSALSTRING
The universal tag for an UniversalString value. |
static int |
UTCTIME
The universal tag for an UTCTime value. |
static int |
UTF8STRING
The universal tag for an UTF8String value. |
static int |
VIDEOTEXSTRING
The universal tag for a VideotextString value. |
static int |
VISIBLESTRING
The universal tag for a VisibleString value. |
| Method Summary | |
static int |
createTag(int clazz,
int number)
Creates an ASN.1 Tag with the specified class and the specified number. |
static int |
getTagClass(int tag)
Returns the class of the specified tag. |
static int |
getTagNumber(int tag)
Returns the number of the specified tag. |
static String |
toString(int tag)
Returns a string representation of the specified tag. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_TAG_NUMBER
public static final int EOC
public static final int BOOLEAN
public static final int INTEGER
public static final int BIT_STRING
public static final int OCTET_STRING
public static final int NULL
public static final int OBJECT_IDENTIFIER
public static final int OBJECT_DESCRIPTOR
public static final int EXTERNAL
public static final int REAL
public static final int ENUMERATED
public static final int EMBEDDED_PDV
public static final int UTF8STRING
public static final int SEQUENCE
public static final int SET
public static final int NUMERICSTRING
public static final int PRINTABLESTRING
public static final int TELETEXSTRING
public static final int T61STRING
TELETEXSTRING.
public static final int VIDEOTEXSTRING
public static final int IA5STRING
public static final int UTCTIME
public static final int GENERALIZEDTIME
public static final int GRAPHICSTRING
public static final int VISIBLESTRING
public static final int GENERALSTRING
public static final int UNIVERSALSTRING
public static final int BMPSTRING
public static final int UNIVERSAL
public static final int APPLICATION
public static final int CONTEXT
public static final int PRIVATE
| Method Detail |
public static int createTag(int clazz,
int number)
clazz - the tag class.number - the tag number.
IllegalArgumentException - if the specified tag number is less than
zeroe or greater than the maximum allowed value for
a tag number (i.e MAX_TAG_NUMBER).public static int getTagClass(int tag)
tag - the tag value whose class is to be extracted. It must be a
valid tag value, i.e one that has been created with createTag(int, int)
method or one that has been returned by a decoder.
public static int getTagNumber(int tag)
tag - the tag value whose number is to be extracted.
public static String toString(int tag)
tag - the tag value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||