org.apache.asn1.ber
Class TypeClass

java.lang.Object
  extended byorg.apache.asn1.ber.TypeClass

public class TypeClass
extends java.lang.Object

Type safe enum for an ASN.1 type class. This can be take one of the following four values:

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

Field Summary
static TypeClass APPLICATION
          enum for the application type class
static int APPLICATION_VAL
          value for the application type class
static TypeClass CONTEXT_SPECIFIC
          enum for the context specific type class
static int CONTEXT_SPECIFIC_VAL
          value for the context specific type class
private  java.lang.String name
          the name of this enumeration element
static TypeClass PRIVATE
          enum for the private type class
static int PRIVATE_VAL
          value for the private type class
static TypeClass UNIVERSAL
          enum for the universal type class
static int UNIVERSAL_VAL
          value for the universal type class
private  int value
          the value of this enumeration element
 
Constructor Summary
private TypeClass(java.lang.String name, int value)
          Private constructor so no other instances can be created other than the public static constants in this class.
 
Method Summary
 java.lang.String getName()
          Get's the name of this enumeration element.
static TypeClass getTypeClass(int octet)
          Gets the ASN.1 type's class using a TLV tag.
static TypeClass getTypeClass(java.lang.String className)
          Gets the enumeration type for the type class regardless of case.
 int getValue()
          Get's the value of this enumeration element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIVERSAL_VAL

public static final int UNIVERSAL_VAL
value for the universal type class

See Also:
Constant Field Values

APPLICATION_VAL

public static final int APPLICATION_VAL
value for the application type class

See Also:
Constant Field Values

CONTEXT_SPECIFIC_VAL

public static final int CONTEXT_SPECIFIC_VAL
value for the context specific type class

See Also:
Constant Field Values

PRIVATE_VAL

public static final int PRIVATE_VAL
value for the private type class

See Also:
Constant Field Values

UNIVERSAL

public static final TypeClass UNIVERSAL
enum for the universal type class


APPLICATION

public static final TypeClass APPLICATION
enum for the application type class


CONTEXT_SPECIFIC

public static final TypeClass CONTEXT_SPECIFIC
enum for the context specific type class


PRIVATE

public static final TypeClass PRIVATE
enum for the private type class


name

private final java.lang.String name
the name of this enumeration element


value

private final int value
the value of this enumeration element

Constructor Detail

TypeClass

private TypeClass(java.lang.String name,
                  int value)
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

getName

public final java.lang.String getName()
Get's the name of this enumeration element.

Returns:
the name of the enumeration element

getValue

public final int getValue()
Get's the value of this enumeration element.

Returns:
the value of the enumeration element

getTypeClass

public static TypeClass getTypeClass(java.lang.String className)
Gets the enumeration type for the type class regardless of case.

Parameters:
className - the type class name
Returns:
the TypeClass for the name

getTypeClass

public static TypeClass getTypeClass(int octet)
Gets the ASN.1 type's class using a TLV tag.

Parameters:
octet - the first octet of the TLV
Returns:
the TypeClass enumeration for the ASN.1 type's class


Copyright © 2004-2006 . All Rights Reserved.