Class cryptiX.asn1.ASN
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptiX.asn1.ASN

java.lang.Object
   |
   +----cryptiX.asn1.ASN

public class ASN
extends Object
The ASN class represents the ASN.1 types. The ASN.1 types are used when communicating with any SNMP agent. Each SNMP attribute has a specific ASN.1 type. These types are represented at the Java level with ASN.XXX literals.

This class also acts as an factory for creating ASN.1 OBJECT subclasses for various kinds of Java objects.


Variable Index

 o BIT_STRING
 o BOOLEAN
 o CONTEXT_SPECIFIC
 o ENUMERATED
 o EXTERNAL
 o IA5STRING
 o INTEGER
 o name
A printable name of this object
 o NULL
 o Null
Special object denoting the NULL asn *value* (not NULL type).
 o OBJECT_DESCRIPTOR
 o OCTET_STRING
 o OID
 o PRINTABLESTRING
 o REAL
 o SEQUENCE
 o SET
 o STRING
 o T61STRING
 o tag
The ASN UNIVERSAL type tag represented by this object.
 o UNKNOWN
Publicly known ASN.1 types
 o UTCTIME

Constructor Index

 o ASN(int, String)
Create a new ASN.1 type with given tag and name.

Method Index

 o create(ASN)
Produces a new ASN.1 object, given the ASN.1 type name of it.
 o create(ASN, Object)
Produces a new ASN.1 object, given the ASN.1 type and Java value for it.
 o equals(Object)
Compares two ASN.1 types by tag
 o getName()
Returns the name of the object
 o getTypes(ASN)
Return the known Java classes the given ASN.1 type can be represented as.
 o hashCode()
Returns hashcode for this object
 o register(ASN, Class)
Registers a new ASN.1 type.
 o toString()
Returns a String that represents the value of this Object.

Variables

 o UNKNOWN
  public final static ASN UNKNOWN
Publicly known ASN.1 types
 o BOOLEAN
  public final static ASN BOOLEAN
 o INTEGER
  public final static ASN INTEGER
 o BIT_STRING
  public final static ASN BIT_STRING
 o OCTET_STRING
  public final static ASN OCTET_STRING
 o STRING
  public final static ASN STRING
 o NULL
  public final static ASN NULL
 o OID
  public final static ASN OID
 o OBJECT_DESCRIPTOR
  public final static ASN OBJECT_DESCRIPTOR
 o EXTERNAL
  public final static ASN EXTERNAL
 o REAL
  public final static ASN REAL
 o ENUMERATED
  public final static ASN ENUMERATED
 o PRINTABLESTRING
  public final static ASN PRINTABLESTRING
 o T61STRING
  public final static ASN T61STRING
 o IA5STRING
  public final static ASN IA5STRING
 o UTCTIME
  public final static ASN UTCTIME
 o SEQUENCE
  public final static ASN SEQUENCE
 o SET
  public final static ASN SET
 o CONTEXT_SPECIFIC
  public final static ASN CONTEXT_SPECIFIC
 o Null
  public final static Object Null
Special object denoting the NULL asn *value* (not NULL type). This can be used when the generic interface requires that a value is given for a NULL type.
 o tag
  protected int tag
The ASN UNIVERSAL type tag represented by this object.
 o name
  protected String name
A printable name of this object

Constructors

 o ASN
  protected ASN(int tag,
                String name)
Create a new ASN.1 type with given tag and name.

Methods

 o getTypes
  public static Class[] getTypes(ASN type)
Return the known Java classes the given ASN.1 type can be represented as.
 o create
  public static ASN1Object create(ASN type) throws InstantiationException
Produces a new ASN.1 object, given the ASN.1 type name of it. If given null, returns a ASN.1 NULL object.
Throws: InstantiationException
if the internal factory couldn't create an instance of requested type
 o create
  public static ASN1Object create(ASN type,
                                  Object value) throws InstantiationException
Produces a new ASN.1 object, given the ASN.1 type and Java value for it.
Throws: InstantiationException
if the internal factory couldn't create an instance of requested type
 o register
  protected static void register(ASN type,
                                 Class cl)
Registers a new ASN.1 type. Called by the OBJECT classes' static initializers to register those ASN.1 types that the OBJECT classes know of.
 o toString
  public String toString()
Returns a String that represents the value of this Object.
Overrides:
toString in class Object
 o getName
  public String getName()
Returns the name of the object
 o equals
  public boolean equals(Object o)
Compares two ASN.1 types by tag
Overrides:
equals in class Object
 o hashCode
  public int hashCode()
Returns hashcode for this object
Overrides:
hashCode in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index