org.apache.asn1.ber.primitives
Class UniversalTag

java.lang.Object
  extended byorg.apache.asn1.ber.TagEnum
      extended byorg.apache.asn1.ber.primitives.UniversalTag

public class UniversalTag
extends TagEnum

Type safe enum for ASN.1 UNIVERSAL class tags. The tags values are constructed using the SNACC representation for tags without the primitive/constructed bit. This is done because several bit, octet and character string types can be encoded as primitives or as constructed types to chunk the value out.

These tags can have one of the following values:

IdUsage
[UNIVERSAL 0] reserved for BER
[UNIVERSAL 1] BOOLEAN
[UNIVERSAL 2] INTEGER
[UNIVERSAL 3] BIT STRING
[UNIVERSAL 4] OCTET STRING
[UNIVERSAL 5] NULL
[UNIVERSAL 6] OBJECT IDENTIFIER
[UNIVERSAL 7] ObjectDescriptor
[UNIVERSAL 8] EXTERNAL, INSTANCE OF
[UNIVERSAL 9] REAL
[UNIVERSAL 10] ENUMERATED
[UNIVERSAL 11] EMBEDDED PDV
[UNIVERSAL 12] UTF8String
[UNIVERSAL 13] RELATIVE-OID
[UNIVERSAL 14] reserved for future use
[UNIVERSAL 15] reserved for future use
[UNIVERSAL 16] SEQUENCE, SEQUENCE OF
[UNIVERSAL 17] SET, SET OF
[UNIVERSAL 18] NumericString
[UNIVERSAL 19] PrintableString
[UNIVERSAL 20] TeletexString, T61String
[UNIVERSAL 21] VideotexString
[UNIVERSAL 22] IA5String
[UNIVERSAL 23] UTCTime
[UNIVERSAL 24] GeneralizedTime
[UNIVERSAL 25] GraphicString
[UNIVERSAL 26] VisibleString, ISO646String
[UNIVERSAL 27] GeneralString
[UNIVERSAL 28] UniversalString
[UNIVERSAL 29] CHARACTER STRING
[UNIVERSAL 30] BMPString
[UNIVERSAL 31] reserved for future use

Version:
$Rev: 289141 $
Author:
Apache Directory Project

Field Summary
static UniversalTag BIT_STRING
          enum for the tag
private static int BIT_STRING_ID
          value for the tag
private static int BIT_STRING_VAL
          value for the tag
static UniversalTag BMP_STRING
          enum for the tag
private static int BMP_STRING_ID
          value for the tag
private static int BMP_STRING_VAL
          value for the tag
static UniversalTag BOOLEAN
          enum for the tag
private static int BOOLEAN_ID
          value for the tag
private static int BOOLEAN_VAL
          value for the tag
static UniversalTag CHARACTER_STRING
          enum for the tag
private static int CHARACTER_STRING_ID
          value for the tag
private static int CHARACTER_STRING_VAL
          value for the tag
static UniversalTag EMBEDDED_PDV
          enum for the tag
private static int EMBEDDED_PDV_ID
          value for the tag
private static int EMBEDDED_PDV_VAL
          value for the tag
static UniversalTag ENUMERATED
          enum for the tag
private static int ENUMERATED_ID
          value for the tag
private static int ENUMERATED_VAL
          value for the tag
static UniversalTag EXTERNAL_INSTANCE_OF
          enum for the tag
private static int EXTERNAL_INSTANCE_OF_ID
          value for the tag
private static int EXTERNAL_INSTANCE_OF_VAL
          value for the tag
static UniversalTag GENERAL_STRING
          enum for the tag
private static int GENERAL_STRING_ID
          value for the tag
private static int GENERAL_STRING_VAL
          value for the tag
static UniversalTag GENERALIZED_TIME
          enum for the tag
private static int GENERALIZED_TIME_ID
          value for the tag
private static int GENERALIZED_TIME_VAL
          value for the tag
static UniversalTag GRAPHIC_STRING
          enum for the tag
private static int GRAPHIC_STRING_ID
          value for the tag
private static int GRAPHIC_STRING_VAL
          value for the tag
static UniversalTag IA5_STRING
          enum for the tag
private static int IA5_STRING_ID
          value for the tag
private static int IA5_STRING_VAL
          value for the tag
static UniversalTag INTEGER
          enum for the tag
private static int INTEGER_ID
          value for the tag
private static int INTEGER_VAL
          value for the tag
static UniversalTag NULL
          enum for the tag
private static int NULL_ID
          value for the tag
private static int NULL_VAL
          value for the tag
static UniversalTag NUMERIC_STRING
          enum for the tag
private static int NUMERIC_STRING_ID
          value for the tag
private static int NUMERIC_STRING_VAL
          value for the tag
static UniversalTag OBJECT_DESCRIPTOR
          enum for the tag
private static int OBJECT_DESCRIPTOR_ID
          value for the tag
private static int OBJECT_DESCRIPTOR_VAL
          value for the tag
static UniversalTag OBJECT_IDENTIFIER
          enum for the tag
private static int OBJECT_IDENTIFIER_ID
          value for the tag
private static int OBJECT_IDENTIFIER_VAL
          value for the tag
static UniversalTag OCTET_STRING
          enum for the tag
private static int OCTET_STRING_ID
          value for the tag
private static int OCTET_STRING_VAL
          value for the tag
static UniversalTag PRINTABLE_STRING
          enum for the tag
private static int PRINTABLE_STRING_ID
          value for the tag
private static int PRINTABLE_STRING_VAL
          value for the tag
static UniversalTag REAL
          enum for the tag
private static int REAL_ID
          value for the tag
private static int REAL_VAL
          value for the tag
static UniversalTag RELATIVE_OID
          enum for the tag
private static int RELATIVE_OID_ID
          value for the tag
private static int RELATIVE_OID_VAL
          value for the tag
static UniversalTag RESERVED0
          enum for the tag
private static int RESERVED0_ID
          value for the tag
private static int RESERVED0_VAL
          value for the tag
static UniversalTag RESERVED14
          enum for the tag
private static int RESERVED14_ID
          value for the tag
private static int RESERVED14_VAL
          value for the tag
static UniversalTag RESERVED15
          enum for the tag
private static int RESERVED15_ID
          value for the tag
private static int RESERVED15_VAL
          value for the tag
static UniversalTag RESERVED31
          enum for the tag
private static int RESERVED31_ID
          value for the tag
private static int RESERVED31_VAL
          value for the tag
static UniversalTag SEQUENCE_SEQUENCE_OF
          enum for the tag
private static int SEQUENCE_SEQUENCE_OF_ID
          value for the tag
private static int SEQUENCE_SEQUENCE_OF_VAL
          value for the tag
static UniversalTag SET_SET_OF
          enum for the tag
private static int SET_SET_OF_ID
          value for the tag
private static int SET_SET_OF_VAL
          value for the tag
static UniversalTag TELETEX_STRING
          enum for the tag
private static int TELETEX_STRING_ID
          value for the tag
private static int TELETEX_STRING_VAL
          value for the tag
static UniversalTag UNIVERSAL_STRING
          enum for the tag
private static int UNIVERSAL_STRING_ID
          value for the tag
private static int UNIVERSAL_STRING_VAL
          value for the tag
static UniversalTag UTC_TIME
          enum for the tag
private static int UTC_TIME_ID
          value for the tag
private static int UTC_TIME_VAL
          value for the tag
static UniversalTag UTF8_STRING
          enum for the tag
private static int UTF8_STRING_ID
          value for the tag
private static int UTF8_STRING_VAL
          value for the tag
static UniversalTag VIDEOTEX_STRING
          enum for the tag
private static int VIDEOTEX_STRING_ID
          value for the tag
private static int VIDEOTEX_STRING_VAL
          value for the tag
static UniversalTag VISIBLE_STRING
          enum for the tag
private static int VISIBLE_STRING_ID
          value for the tag
private static int VISIBLE_STRING_VAL
          value for the tag
 
Fields inherited from class org.apache.asn1.ber.TagEnum
 
Constructor Summary
private UniversalTag(java.lang.String name, int value, int id)
          Private constructor so no other instances can be created other than the public static constants in this class.
 
Method Summary
static UniversalTag getUniversalTag(int value)
          Gets the ASN.1 UNIVERSAL type tag's enum using a tag value.
static UniversalTag getUniversalTagById(int id)
          Gets the ASN.1 UNIVERSAL type tag's enum using a tag value.
 
Methods inherited from class org.apache.asn1.ber.TagEnum
getConstructedTag, getName, getPrimitiveTag, getTagId, getTypeClass, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESERVED0_VAL

private static final int RESERVED0_VAL
value for the tag

See Also:
Constant Field Values

BOOLEAN_VAL

private static final int BOOLEAN_VAL
value for the tag

See Also:
Constant Field Values

INTEGER_VAL

private static final int INTEGER_VAL
value for the tag

See Also:
Constant Field Values

BIT_STRING_VAL

private static final int BIT_STRING_VAL
value for the tag

See Also:
Constant Field Values

OCTET_STRING_VAL

private static final int OCTET_STRING_VAL
value for the tag

See Also:
Constant Field Values

NULL_VAL

private static final int NULL_VAL
value for the tag

See Also:
Constant Field Values

OBJECT_IDENTIFIER_VAL

private static final int OBJECT_IDENTIFIER_VAL
value for the tag

See Also:
Constant Field Values

OBJECT_DESCRIPTOR_VAL

private static final int OBJECT_DESCRIPTOR_VAL
value for the tag

See Also:
Constant Field Values

EXTERNAL_INSTANCE_OF_VAL

private static final int EXTERNAL_INSTANCE_OF_VAL
value for the tag

See Also:
Constant Field Values

REAL_VAL

private static final int REAL_VAL
value for the tag

See Also:
Constant Field Values

ENUMERATED_VAL

private static final int ENUMERATED_VAL
value for the tag

See Also:
Constant Field Values

EMBEDDED_PDV_VAL

private static final int EMBEDDED_PDV_VAL
value for the tag

See Also:
Constant Field Values

UTF8_STRING_VAL

private static final int UTF8_STRING_VAL
value for the tag

See Also:
Constant Field Values

RELATIVE_OID_VAL

private static final int RELATIVE_OID_VAL
value for the tag

See Also:
Constant Field Values

RESERVED14_VAL

private static final int RESERVED14_VAL
value for the tag

See Also:
Constant Field Values

RESERVED15_VAL

private static final int RESERVED15_VAL
value for the tag

See Also:
Constant Field Values

SEQUENCE_SEQUENCE_OF_VAL

private static final int SEQUENCE_SEQUENCE_OF_VAL
value for the tag

See Also:
Constant Field Values

SET_SET_OF_VAL

private static final int SET_SET_OF_VAL
value for the tag

See Also:
Constant Field Values

NUMERIC_STRING_VAL

private static final int NUMERIC_STRING_VAL
value for the tag

See Also:
Constant Field Values

PRINTABLE_STRING_VAL

private static final int PRINTABLE_STRING_VAL
value for the tag

See Also:
Constant Field Values

TELETEX_STRING_VAL

private static final int TELETEX_STRING_VAL
value for the tag

See Also:
Constant Field Values

VIDEOTEX_STRING_VAL

private static final int VIDEOTEX_STRING_VAL
value for the tag

See Also:
Constant Field Values

IA5_STRING_VAL

private static final int IA5_STRING_VAL
value for the tag

See Also:
Constant Field Values

UTC_TIME_VAL

private static final int UTC_TIME_VAL
value for the tag

See Also:
Constant Field Values

GENERALIZED_TIME_VAL

private static final int GENERALIZED_TIME_VAL
value for the tag

See Also:
Constant Field Values

GRAPHIC_STRING_VAL

private static final int GRAPHIC_STRING_VAL
value for the tag

See Also:
Constant Field Values

VISIBLE_STRING_VAL

private static final int VISIBLE_STRING_VAL
value for the tag

See Also:
Constant Field Values

GENERAL_STRING_VAL

private static final int GENERAL_STRING_VAL
value for the tag

See Also:
Constant Field Values

UNIVERSAL_STRING_VAL

private static final int UNIVERSAL_STRING_VAL
value for the tag

See Also:
Constant Field Values

CHARACTER_STRING_VAL

private static final int CHARACTER_STRING_VAL
value for the tag

See Also:
Constant Field Values

BMP_STRING_VAL

private static final int BMP_STRING_VAL
value for the tag

See Also:
Constant Field Values

RESERVED31_VAL

private static final int RESERVED31_VAL
value for the tag

See Also:
Constant Field Values

RESERVED0_ID

private static final int RESERVED0_ID
value for the tag

See Also:
Constant Field Values

BOOLEAN_ID

private static final int BOOLEAN_ID
value for the tag

See Also:
Constant Field Values

INTEGER_ID

private static final int INTEGER_ID
value for the tag

See Also:
Constant Field Values

BIT_STRING_ID

private static final int BIT_STRING_ID
value for the tag

See Also:
Constant Field Values

OCTET_STRING_ID

private static final int OCTET_STRING_ID
value for the tag

See Also:
Constant Field Values

NULL_ID

private static final int NULL_ID
value for the tag

See Also:
Constant Field Values

OBJECT_IDENTIFIER_ID

private static final int OBJECT_IDENTIFIER_ID
value for the tag

See Also:
Constant Field Values

OBJECT_DESCRIPTOR_ID

private static final int OBJECT_DESCRIPTOR_ID
value for the tag

See Also:
Constant Field Values

EXTERNAL_INSTANCE_OF_ID

private static final int EXTERNAL_INSTANCE_OF_ID
value for the tag

See Also:
Constant Field Values

REAL_ID

private static final int REAL_ID
value for the tag

See Also:
Constant Field Values

ENUMERATED_ID

private static final int ENUMERATED_ID
value for the tag

See Also:
Constant Field Values

EMBEDDED_PDV_ID

private static final int EMBEDDED_PDV_ID
value for the tag

See Also:
Constant Field Values

UTF8_STRING_ID

private static final int UTF8_STRING_ID
value for the tag

See Also:
Constant Field Values

RELATIVE_OID_ID

private static final int RELATIVE_OID_ID
value for the tag

See Also:
Constant Field Values

RESERVED14_ID

private static final int RESERVED14_ID
value for the tag

See Also:
Constant Field Values

RESERVED15_ID

private static final int RESERVED15_ID
value for the tag

See Also:
Constant Field Values

SEQUENCE_SEQUENCE_OF_ID

private static final int SEQUENCE_SEQUENCE_OF_ID
value for the tag

See Also:
Constant Field Values

SET_SET_OF_ID

private static final int SET_SET_OF_ID
value for the tag

See Also:
Constant Field Values

NUMERIC_STRING_ID

private static final int NUMERIC_STRING_ID
value for the tag

See Also:
Constant Field Values

PRINTABLE_STRING_ID

private static final int PRINTABLE_STRING_ID
value for the tag

See Also:
Constant Field Values

TELETEX_STRING_ID

private static final int TELETEX_STRING_ID
value for the tag

See Also:
Constant Field Values

VIDEOTEX_STRING_ID

private static final int VIDEOTEX_STRING_ID
value for the tag

See Also:
Constant Field Values

IA5_STRING_ID

private static final int IA5_STRING_ID
value for the tag

See Also:
Constant Field Values

UTC_TIME_ID

private static final int UTC_TIME_ID
value for the tag

See Also:
Constant Field Values

GENERALIZED_TIME_ID

private static final int GENERALIZED_TIME_ID
value for the tag

See Also:
Constant Field Values

GRAPHIC_STRING_ID

private static final int GRAPHIC_STRING_ID
value for the tag

See Also:
Constant Field Values

VISIBLE_STRING_ID

private static final int VISIBLE_STRING_ID
value for the tag

See Also:
Constant Field Values

GENERAL_STRING_ID

private static final int GENERAL_STRING_ID
value for the tag

See Also:
Constant Field Values

UNIVERSAL_STRING_ID

private static final int UNIVERSAL_STRING_ID
value for the tag

See Also:
Constant Field Values

CHARACTER_STRING_ID

private static final int CHARACTER_STRING_ID
value for the tag

See Also:
Constant Field Values

BMP_STRING_ID

private static final int BMP_STRING_ID
value for the tag

See Also:
Constant Field Values

RESERVED31_ID

private static final int RESERVED31_ID
value for the tag

See Also:
Constant Field Values

BOOLEAN

public static final UniversalTag BOOLEAN
enum for the tag


RESERVED0

public static final UniversalTag RESERVED0
enum for the tag


INTEGER

public static final UniversalTag INTEGER
enum for the tag


BIT_STRING

public static final UniversalTag BIT_STRING
enum for the tag


OCTET_STRING

public static final UniversalTag OCTET_STRING
enum for the tag


NULL

public static final UniversalTag NULL
enum for the tag


OBJECT_IDENTIFIER

public static final UniversalTag OBJECT_IDENTIFIER
enum for the tag


OBJECT_DESCRIPTOR

public static final UniversalTag OBJECT_DESCRIPTOR
enum for the tag


EXTERNAL_INSTANCE_OF

public static final UniversalTag EXTERNAL_INSTANCE_OF
enum for the tag


REAL

public static final UniversalTag REAL
enum for the tag


ENUMERATED

public static final UniversalTag ENUMERATED
enum for the tag


EMBEDDED_PDV

public static final UniversalTag EMBEDDED_PDV
enum for the tag


UTF8_STRING

public static final UniversalTag UTF8_STRING
enum for the tag


RELATIVE_OID

public static final UniversalTag RELATIVE_OID
enum for the tag


RESERVED14

public static final UniversalTag RESERVED14
enum for the tag


RESERVED15

public static final UniversalTag RESERVED15
enum for the tag


SEQUENCE_SEQUENCE_OF

public static final UniversalTag SEQUENCE_SEQUENCE_OF
enum for the tag


SET_SET_OF

public static final UniversalTag SET_SET_OF
enum for the tag


NUMERIC_STRING

public static final UniversalTag NUMERIC_STRING
enum for the tag


PRINTABLE_STRING

public static final UniversalTag PRINTABLE_STRING
enum for the tag


TELETEX_STRING

public static final UniversalTag TELETEX_STRING
enum for the tag


VIDEOTEX_STRING

public static final UniversalTag VIDEOTEX_STRING
enum for the tag


IA5_STRING

public static final UniversalTag IA5_STRING
enum for the tag


UTC_TIME

public static final UniversalTag UTC_TIME
enum for the tag


GENERALIZED_TIME

public static final UniversalTag GENERALIZED_TIME
enum for the tag


GRAPHIC_STRING

public static final UniversalTag GRAPHIC_STRING
enum for the tag


VISIBLE_STRING

public static final UniversalTag VISIBLE_STRING
enum for the tag


GENERAL_STRING

public static final UniversalTag GENERAL_STRING
enum for the tag


UNIVERSAL_STRING

public static final UniversalTag UNIVERSAL_STRING
enum for the tag


CHARACTER_STRING

public static final UniversalTag CHARACTER_STRING
enum for the tag


BMP_STRING

public static final UniversalTag BMP_STRING
enum for the tag


RESERVED31

public static final UniversalTag RESERVED31
enum for the tag

Constructor Detail

UniversalTag

private UniversalTag(java.lang.String name,
                     int value,
                     int id)
Private constructor so no other instances can be created other than the public static constants in this class.

Parameters:
name - a string name for the enumeration value.
value - the integer value of the enumeration.
Method Detail

getUniversalTag

public static UniversalTag getUniversalTag(int value)
Gets the ASN.1 UNIVERSAL type tag's enum using a tag value.

Parameters:
value - the first octet of the TLV
Returns:
the valued enum for the ASN.1 UNIVERSAL type tag

getUniversalTagById

public static UniversalTag getUniversalTagById(int id)
Gets the ASN.1 UNIVERSAL type tag's enum using a tag value.

Parameters:
id - the first octet of the TLV
Returns:
the valued enum for the ASN.1 UNIVERSAL type tag


Copyright © 2004-2006 . All Rights Reserved.