|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectschemajic.model.ASN1Value
schemajic.model.ASN1OpenType
public abstract class ASN1OpenType
Models the abstract concept of a value of an ASN.1 "open type".
The open type represents the valid ASN.1 encoding of any ASN.1 type. It is important to remember that values of this class hold a complete ASN.1 *encoding* - the complete encoding of a value of some ASN.1 type.
If a value of ASN1OpenType is contained within another
ASN.1 value ( SEQUENCE, SET OF, etc ) and that value is encoded, the
encoding contained in the ASN1OpenType is simply inserted
into the current encoding as is. Therefore, it is possible to create
an encoding that contains values of differing encoding rules, which may
or may not be legal with respect to the protocol being implemented.
| Constructor Summary | |
|---|---|
ASN1OpenType()
Constructor for ASN1OpenType. |
|
ASN1OpenType(ASN1Value decodedValue)
SConstructor for ASN1OpenType with
initialization value parameter. |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(ValueVisitor visitor,
java.lang.Object object)
Accepts a visit from the ValueVisitor |
abstract boolean |
compareEncodingTo(ASN1ObjectIdentifier oid)
Defines how a method would compare the encoding of an open type value to the encoding of the type of a specified ASN.1 information object identifier. |
Type |
getAsn1Type()
Returns some ASN.1 type in its encoded form (an open type). |
ASN1Value |
getDecodedValue()
Returns the current decoded value of an ASN.1 type. |
abstract byte[] |
getEncodedValue()
Defines how a method would get the encoded value of an open type, the value of an ASN.1 type in its encoded form. |
abstract java.lang.String |
getEncodingAsString()
Defines how a method would get the encoded value of an open type, the value of an ASN.1 type in its encoded form, as a string. |
abstract byte[] |
getRawBinaryValue()
Defines how a method would get the 'value' of a TLV encoding of an ASN.1 type as an unstructured (opaque) binary value. |
boolean |
isDecoded()
Returns boolean true if the current
value is not null, otherwise returns false. |
void |
setDecodedValue(ASN1Value value)
Sets the current decoded value of an ASN.1 type to the provided value. |
abstract void |
setEncodedValue(byte[] encoding)
Defines how a method would set the encoded value of an open type, the value of an ASN.1 type in its encoded form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ASN1OpenType()
ASN1OpenType.
public ASN1OpenType(ASN1Value decodedValue)
ASN1OpenType with
initialization value parameter.
decodedValue - a decoded value that becomes the current value| Method Detail |
|---|
public boolean isDecoded()
boolean true if the current
value is not null, otherwise returns false.
public ASN1Value getDecodedValue()
public void setDecodedValue(ASN1Value value)
value - provided value to be set as the current valuepublic abstract byte[] getEncodedValue()
public abstract void setEncodedValue(byte[] encoding)
public abstract java.lang.String getEncodingAsString()
public abstract boolean compareEncodingTo(ASN1ObjectIdentifier oid)
throws java.io.IOException
If the encoded value in this open type is NOT the
expected value of ASN.1 type OBJECT IDENTIFIER,
throws an illegal argument exception.
oid - an ASN.1 information object identifier value
java.io.IOException
public abstract byte[] getRawBinaryValue()
throws DecodingException,
java.io.IOException
DecodingException
java.io.IOException
public java.lang.Object accept(ValueVisitor visitor,
java.lang.Object object)
throws VisitorException
visit from the ValueVisitor
accept in class ASN1Valuevisitor - the function applicator (mapper), which knows how to
process the given object type and apply appropriate operations to
the elements of this type of objectobject - an object to be visited
VisitorExceptionpublic Type getAsn1Type()
getAsn1Type in class ASN1Value
|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||