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.
-
BIT_STRING
-
-
BOOLEAN
-
-
CONTEXT_SPECIFIC
-
-
ENUMERATED
-
-
EXTERNAL
-
-
IA5STRING
-
-
INTEGER
-
-
name
- A printable name of this object
-
NULL
-
-
Null
- Special object denoting the NULL asn *value* (not NULL type).
-
OBJECT_DESCRIPTOR
-
-
OCTET_STRING
-
-
OID
-
-
PRINTABLESTRING
-
-
REAL
-
-
SEQUENCE
-
-
SET
-
-
STRING
-
-
T61STRING
-
-
tag
- The ASN UNIVERSAL type tag represented by this object.
-
UNKNOWN
- Publicly known ASN.1 types
-
UTCTIME
-
-
ASN(int, String)
- Create a new ASN.1 type with given tag and name.
-
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.
-
equals(Object)
- Compares two ASN.1 types by tag
-
getName()
- Returns the name of the object
-
getTypes(ASN)
- Return the known Java classes the given ASN.1 type
can be represented as.
-
hashCode()
- Returns hashcode for this object
-
register(ASN, Class)
- Registers a new ASN.1 type.
-
toString()
- Returns a String that represents the value of this Object.
UNKNOWN
public final static ASN UNKNOWN
- Publicly known ASN.1 types
BOOLEAN
public final static ASN BOOLEAN
INTEGER
public final static ASN INTEGER
BIT_STRING
public final static ASN BIT_STRING
OCTET_STRING
public final static ASN OCTET_STRING
STRING
public final static ASN STRING
NULL
public final static ASN NULL
OID
public final static ASN OID
OBJECT_DESCRIPTOR
public final static ASN OBJECT_DESCRIPTOR
EXTERNAL
public final static ASN EXTERNAL
REAL
public final static ASN REAL
ENUMERATED
public final static ASN ENUMERATED
PRINTABLESTRING
public final static ASN PRINTABLESTRING
T61STRING
public final static ASN T61STRING
IA5STRING
public final static ASN IA5STRING
UTCTIME
public final static ASN UTCTIME
SEQUENCE
public final static ASN SEQUENCE
SET
public final static ASN SET
CONTEXT_SPECIFIC
public final static ASN CONTEXT_SPECIFIC
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.
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.
getTypes
public static Class[] getTypes(ASN type)
- Return the known Java classes the given ASN.1 type
can be represented as.
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.
toString
public String toString()
- Returns a String that represents the value of this Object.
- Overrides:
- toString in class Object
getName
public String getName()
- Returns the name of the object
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
All Packages Class Hierarchy This Package Previous Next Index