org.ldaptive.asn1
Enum UniversalDERTag

java.lang.Object
  extended by java.lang.Enum<UniversalDERTag>
      extended by org.ldaptive.asn1.UniversalDERTag
All Implemented Interfaces:
Serializable, Comparable<UniversalDERTag>, DERTag

public enum UniversalDERTag
extends Enum<UniversalDERTag>
implements DERTag

Enumeration with common BER/DER universal tag types.

Version:
$Revision: 3052 $ $Date: 2014-09-05 13:56:42 -0400 (Fri, 05 Sep 2014) $
Author:
Middleware Services

Enum Constant Summary
BITSTR
          BITSTRING type.
BMPSTR
          BMPString type.
BOOL
          BOOLEAN type.
CHARSTR
          CharacterString type.
EMBPDV
          EMBEDDED PDV type.
ENUM
          ENUMERATED type.
EXT
          EXTERNAL type.
GENSTR
          GeneralString type.
GENTIME
          GeneralizedTime type.
GRAPHICSTR
          GraphicString type.
IA5STR
          IA5String type.
INT
          INTEGER type.
ISO646STR
          ISO646String type.
NULL
          NULL type.
NUMSTR
          NumericString type.
OCTSTR
          OCTETSTRING type.
ODESC
          ObjectDescriptor type.
OID
          OBJECT IDENTIFIER type.
PRINTSTR
          PrintableString type.
REAL
          REAL type.
ROID
          RELATIVE-OID type.
SEQ
          SEQUENCE type.
SET
          SET type.
T61STR
          T61String type.
UNISTR
          UniversalString type.
UTCTIME
          UTCTime type.
UTF8STR
          UTF8String type.
VTEXSTR
          VideotexString type.
 
Field Summary
static int TAG_CLASS
          Universal tag class is 00b in first two high-order bytes.
 
Fields inherited from interface org.ldaptive.asn1.DERTag
ASN_CONSTRUCTED
 
Method Summary
static UniversalDERTag fromTagName(String name)
          Looks up a universal tag from a tag name.
static UniversalDERTag fromTagNo(int number)
          Looks up a universal tag from a tag number.
 int getTagByte()
          Gets the value of this tag for encoding.
 int getTagNo()
          Gets the decimal value of the tag.
 boolean isConstructed()
          Determines whether the tag is constructed or primitive.
static UniversalDERTag valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UniversalDERTag[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ldaptive.asn1.DERTag
name
 

Enum Constant Detail

BOOL

public static final UniversalDERTag BOOL
BOOLEAN type.


INT

public static final UniversalDERTag INT
INTEGER type.


BITSTR

public static final UniversalDERTag BITSTR
BITSTRING type.


OCTSTR

public static final UniversalDERTag OCTSTR
OCTETSTRING type.


NULL

public static final UniversalDERTag NULL
NULL type.


OID

public static final UniversalDERTag OID
OBJECT IDENTIFIER type.


ODESC

public static final UniversalDERTag ODESC
ObjectDescriptor type.


EXT

public static final UniversalDERTag EXT
EXTERNAL type.


REAL

public static final UniversalDERTag REAL
REAL type.


ENUM

public static final UniversalDERTag ENUM
ENUMERATED type.


EMBPDV

public static final UniversalDERTag EMBPDV
EMBEDDED PDV type.


UTF8STR

public static final UniversalDERTag UTF8STR
UTF8String type.


ROID

public static final UniversalDERTag ROID
RELATIVE-OID type.


SEQ

public static final UniversalDERTag SEQ
SEQUENCE type.


SET

public static final UniversalDERTag SET
SET type.


NUMSTR

public static final UniversalDERTag NUMSTR
NumericString type.


PRINTSTR

public static final UniversalDERTag PRINTSTR
PrintableString type.


T61STR

public static final UniversalDERTag T61STR
T61String type.


VTEXSTR

public static final UniversalDERTag VTEXSTR
VideotexString type.


IA5STR

public static final UniversalDERTag IA5STR
IA5String type.


UTCTIME

public static final UniversalDERTag UTCTIME
UTCTime type.


GENTIME

public static final UniversalDERTag GENTIME
GeneralizedTime type.


GRAPHICSTR

public static final UniversalDERTag GRAPHICSTR
GraphicString type.


ISO646STR

public static final UniversalDERTag ISO646STR
ISO646String type.


GENSTR

public static final UniversalDERTag GENSTR
GeneralString type.


UNISTR

public static final UniversalDERTag UNISTR
UniversalString type.


CHARSTR

public static final UniversalDERTag CHARSTR
CharacterString type.


BMPSTR

public static final UniversalDERTag BMPSTR
BMPString type.

Field Detail

TAG_CLASS

public static final int TAG_CLASS
Universal tag class is 00b in first two high-order bytes.

See Also:
Constant Field Values
Method Detail

values

public static UniversalDERTag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UniversalDERTag c : UniversalDERTag.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UniversalDERTag valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getTagNo

public int getTagNo()
Gets the decimal value of the tag.

Specified by:
getTagNo in interface DERTag
Returns:
decimal tag number.

isConstructed

public boolean isConstructed()
Determines whether the tag is constructed or primitive.

Specified by:
isConstructed in interface DERTag
Returns:
true if constructed, false if primitive.

getTagByte

public int getTagByte()
Gets the value of this tag for encoding.

Specified by:
getTagByte in interface DERTag
Returns:
byte value of this tag

fromTagNo

public static UniversalDERTag fromTagNo(int number)
Looks up a universal tag from a tag number.

Parameters:
number - tag number.
Returns:
tag object corresponding to given number.
Throws:
IllegalArgumentException - if tag is unknown

fromTagName

public static UniversalDERTag fromTagName(String name)
Looks up a universal tag from a tag name. This method differs from valueOf(String) in that it does not throw for unknown names.

Parameters:
name - tag name.
Returns:
tag object corresponding to given name or null if no tag of the given name is found.


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.