All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.asn1.ASN

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

public class ASN
extends Object
implements Cloneable
The ASN class represents the ASN.1 types. 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
Publicly known ASN.1 types
 o CON_SPEC
 o ENUMERATED
 o EXTERNAL
 o GeneralizedTime
 o GeneralString
 o IA5String
 o INTEGER
 o name
A printable name of this object
 o NULL
 o NumericString
 o OBJECT_DESCRIPTOR
 o ObjectID
 o OCTET_STRING
 o PrintableString
 o REAL
 o SEQUENCE
 o SET
 o T61String
 o tag
The ASN UNIVERSAL type tag represented by this object.
 o UniString
 o UTCTime
 o VisibleString

Constructor Index

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

Method Index

 o clone()
 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 createSequenceOf(ASN1Type[])
Creates a SequenceOf ASN.1 object.
 o createSetOf(ASN1Type[])
Creates a SetOf ASN.1 object.
 o equals(Object)
Compares two ASN.1 types by tag
 o getName()
Returns the name of this ASN.1 type.
 o getTag()
Returns the tag of this ASN.1 type.
 o hashCode()
Returns hashcode for this object
 o init()
 o parseSequenceOf(ASN1Object, String)
 o register(ASN, Class)
Registers a new ASN.1 type.
 o toString()
Returns a String that represents the value of this Object.

Variables

 o BOOLEAN
 public static final ASN BOOLEAN
Publicly known ASN.1 types

 o INTEGER
 public static final ASN INTEGER
 o BIT_STRING
 public static final ASN BIT_STRING
 o OCTET_STRING
 public static final ASN OCTET_STRING
 o NULL
 public static final ASN NULL
 o ObjectID
 public static final ASN ObjectID
 o OBJECT_DESCRIPTOR
 public static final ASN OBJECT_DESCRIPTOR
 o EXTERNAL
 public static final ASN EXTERNAL
 o REAL
 public static final ASN REAL
 o ENUMERATED
 public static final ASN ENUMERATED
 o NumericString
 public static final ASN NumericString
 o PrintableString
 public static final ASN PrintableString
 o T61String
 public static final ASN T61String
 o IA5String
 public static final ASN IA5String
 o UTCTime
 public static final ASN UTCTime
 o GeneralizedTime
 public static final ASN GeneralizedTime
 o VisibleString
 public static final ASN VisibleString
 o GeneralString
 public static final ASN GeneralString
 o UniString
 public static final ASN UniString
 o SEQUENCE
 public static final ASN SEQUENCE
 o SET
 public static final ASN SET
 o CON_SPEC
 public static final ASN CON_SPEC
 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 init
 protected static void init()
 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 getName
 public String getName()
Returns the name of this ASN.1 type.

 o getTag
 public int getTag()
Returns the tag of this ASN.1 type.

 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
 o clone
 public Object clone()
Overrides:
clone in class Object
 o createSequenceOf
 public static ASN1Object createSequenceOf(ASN1Type array[])
Creates a SequenceOf ASN.1 object.

Parameters:
array - the array of objects with the objects
Returns:
the created ASN1Object
 o createSetOf
 public static ASN1Object createSetOf(ASN1Type array[])
Creates a SetOf ASN.1 object.

Parameters:
array - the array of objects with the objects
Returns:
the created ASN1Object
 o parseSequenceOf
 public static ASN1Type[] parseSequenceOf(ASN1Object obj,
                                          String className) throws CodingException
 o toString
 public String toString()
Returns a String that represents the value of this Object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index