|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectschemajic.codec.Encoder
schemajic.encoder.BXEREncoder
schemajic.encoder.CXEREncoder
public class CXEREncoder
Encoder for Canonical XML Encoding Rules (CXER) of ASN.1.
Note that XML Comments and Processing Instructions are NOT standardized in BXER/CXER.
| Field Summary |
|---|
| Fields inherited from class schemajic.encoder.BXEREncoder |
|---|
_binaryFormat, _buffer, _currentSchema, _curXmlFormat, _gtFormat, _output, _type, _useNamedIntegers |
| Constructor Summary | |
|---|---|
CXEREncoder()
|
|
| Method Summary | |
|---|---|
protected XmlWriter |
createXmlWriter(java.io.OutputStream out)
Creates a new XML writer for the given output stream. |
protected void |
printArcs(int[] arcs)
|
protected void |
printDefaultValue(ASN1Value value,
Field fieldInfo)
|
java.lang.Object |
visit(ASN1BitString value,
java.lang.Object object)
Encode the bits of the BIT STRING as a string of
ones and zeroes with no trailing bits. |
java.lang.Object |
visit(ASN1Boolean value,
java.lang.Object object)
The only valid values for a BOOLEAN are 'true' or 'false'. |
java.lang.Object |
visit(ASN1Choice value,
java.lang.Object object)
Encode the value of the chosen field. |
java.lang.Object |
visit(ASN1Enumerated value,
java.lang.Object object)
Always print the named number as an empty tag. |
java.lang.Object |
visit(ASN1GeneralizedTime value,
java.lang.Object object)
An ASN.1 type GeneralizedTime visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1Integer value,
java.lang.Object object)
An integer value that is not part of a NamedNumberList must be of the format SignedNumber: 0 | -n | n. |
java.lang.Object |
visit(ASN1ObjectIdentifier value,
java.lang.Object object)
We always encode the value of an OBJECT-IDENTIFIER using the XMLNumberForm ( dot notation ). |
java.lang.Object |
visit(ASN1OctetString value,
java.lang.Object object)
Print as a string of hex characters. |
java.lang.Object |
visit(ASN1OpenType value,
java.lang.Object object)
If the OpenType contains a decoded ASN.1 value, then encode the contained value, otherwise assume that the user has provided a correctly encoded value and copy that value into the output stream. |
java.lang.Object |
visit(ASN1RelativeOID value,
java.lang.Object object)
We always encode the value of an OBJECT-IDENTIFIER using the XMLNumberForm ( dot notation ). |
protected void |
writeProlog()
The prolog is required to be absent in the encoding. |
| Methods inherited from class schemajic.encoder.BXEREncoder |
|---|
encode, printArcs, setUseNamedIntegers, setWriteProlog, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface schemajic.model.ValueVisitor |
|---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
| Constructor Detail |
|---|
public CXEREncoder()
| Method Detail |
|---|
protected XmlWriter createXmlWriter(java.io.OutputStream out)
createXmlWriter in class BXEREncoderout - an output stream
XmlWriter
public java.lang.Object visit(ASN1Boolean value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of an ASN.1 type BOOLEAN in its encoded formobject - visit an object of ASN.1 type BOOLEAN
VisitorException
public java.lang.Object visit(ASN1BitString value,
java.lang.Object object)
throws VisitorException
BIT STRING as a string of
ones and zeroes with no trailing bits.
Note that only the basic BIT STRING type is supported,
and there is no support for NamedBitList values.
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type BIT STRINGobject - an Object to visit
null value
VisitorException
public java.lang.Object visit(ASN1Choice value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of some ASN.1 CHOICE type in its encoded formobject - visit an object of the ASN.1 CHOICE type
VisitorException
public java.lang.Object visit(ASN1Enumerated value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type ENUMERATED in its encoded formobject - visit an object of ASN.1 type ENUMERATED
VisitorException
public java.lang.Object visit(ASN1GeneralizedTime value,
java.lang.Object object)
throws VisitorException
ValueVisitorGeneralizedTime visit method with value and
object parameters.
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type GeneralizedTime in its encoded formobject - visit an object of ASN.1 type GeneralizedTime
VisitorException
public java.lang.Object visit(ASN1Integer value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type INTEGER in its encoded formobject - visit an object of ASN.1 type INTEGER
VisitorException
public java.lang.Object visit(ASN1ObjectIdentifier value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type OBJECT IDENTIFIER in its encoded formobject - visit an object of ASN.1 type OBJECT IDENTIFIER
VisitorException
public java.lang.Object visit(ASN1OctetString value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type OCTET STRING in its encoded formobject - visit an object of ASN.1 type OCTET STRING
VisitorException
public java.lang.Object visit(ASN1RelativeOID value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of ASN.1 type RELATIVE_OID in its encoded formobject - visit an object of ASN.1 type RELATIVE_OID
VisitorException
public java.lang.Object visit(ASN1OpenType value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvisit in class BXEREncodervalue - a value of an ASN.1 type in its encoded form (an open type)object - visit an object of the ASN.1 open type
VisitorExceptionprotected void writeProlog()
writeProlog in class BXEREncoder
protected void printDefaultValue(ASN1Value value,
Field fieldInfo)
throws EncodingException
printDefaultValue in class BXEREncoderEncodingExceptionprotected void printArcs(int[] arcs)
|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||