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.
-
BIT_STRING
-
-
BOOLEAN
- Publicly known ASN.1 types
-
CON_SPEC
-
-
ENUMERATED
-
-
EXTERNAL
-
-
GeneralizedTime
-
-
GeneralString
-
-
IA5String
-
-
INTEGER
-
-
name
- A printable name of this object
-
NULL
-
-
NumericString
-
-
OBJECT_DESCRIPTOR
-
-
ObjectID
-
-
OCTET_STRING
-
-
PrintableString
-
-
REAL
-
-
SEQUENCE
-
-
SET
-
-
T61String
-
-
tag
- The ASN UNIVERSAL type tag represented by this object.
-
UniString
-
-
UTCTime
-
-
VisibleString
-
-
ASN(int, String)
- Create a new ASN.1 type with given tag and name.
-
clone()
-
-
create(ASN)
- Produces a new ASN.1 object, given the ASN.1 type name of it.
-
create(ASN, Object)
- Produces a new ASN.1 object, given the ASN.1 type and Java value
for it.
-
createSequenceOf(ASN1Type[])
- Creates a SequenceOf ASN.1 object.
-
createSetOf(ASN1Type[])
- Creates a SetOf ASN.1 object.
-
equals(Object)
- Compares two ASN.1 types by tag
-
getName()
- Returns the name of this ASN.1 type.
-
getTag()
- Returns the tag of this ASN.1 type.
-
hashCode()
- Returns hashcode for this object
-
init()
-
-
parseSequenceOf(ASN1Object, String)
-
-
register(ASN, Class)
- Registers a new ASN.1 type.
-
toString()
- Returns a String that represents the value of this Object.
BOOLEAN
public static final ASN BOOLEAN
- Publicly known ASN.1 types
INTEGER
public static final ASN INTEGER
BIT_STRING
public static final ASN BIT_STRING
OCTET_STRING
public static final ASN OCTET_STRING
NULL
public static final ASN NULL
ObjectID
public static final ASN ObjectID
OBJECT_DESCRIPTOR
public static final ASN OBJECT_DESCRIPTOR
EXTERNAL
public static final ASN EXTERNAL
REAL
public static final ASN REAL
ENUMERATED
public static final ASN ENUMERATED
NumericString
public static final ASN NumericString
PrintableString
public static final ASN PrintableString
T61String
public static final ASN T61String
IA5String
public static final ASN IA5String
UTCTime
public static final ASN UTCTime
GeneralizedTime
public static final ASN GeneralizedTime
VisibleString
public static final ASN VisibleString
GeneralString
public static final ASN GeneralString
UniString
public static final ASN UniString
SEQUENCE
public static final ASN SEQUENCE
SET
public static final ASN SET
CON_SPEC
public static final ASN CON_SPEC
tag
protected int tag
- The ASN UNIVERSAL type tag represented by this object.
name
protected String name
- A printable name of this object
ASN
protected ASN(int tag,
String name)
- Create a new ASN.1 type with given tag and name.
init
protected static void init()
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
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
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.
getName
public String getName()
- Returns the name of this ASN.1 type.
getTag
public int getTag()
- Returns the tag of this ASN.1 type.
equals
public boolean equals(Object o)
- Compares two ASN.1 types by tag
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Returns hashcode for this object
- Overrides:
- hashCode in class Object
clone
public Object clone()
- Overrides:
- clone in class Object
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
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
parseSequenceOf
public static ASN1Type[] parseSequenceOf(ASN1Object obj,
String className) throws CodingException
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