|
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
public class BXEREncoder
Encoder for Basic XML Encoding Rules (BXER) of ASN.1.
Note that XML Comments and Processing Instructions are NOT standardized in BXER/CXER.
| Field Summary | |
|---|---|
protected BinaryFormat |
_binaryFormat
|
protected java.lang.StringBuffer |
_buffer
|
protected Schema |
_currentSchema
|
protected java.lang.String |
_curXmlFormat
|
protected GeneralizedTimeFormat |
_gtFormat
|
protected XmlWriter |
_output
The stream that the value will be encoded into. |
protected Type |
_type
The meta schemajic.model of the value that is currently being encoded. |
protected boolean |
_useNamedIntegers
|
| Constructor Summary | |
|---|---|
BXEREncoder()
|
|
| Method Summary | |
|---|---|
protected XmlWriter |
createXmlWriter(java.io.OutputStream out)
|
void |
encode(ASN1Value value,
java.io.OutputStream out)
Abstract definition of a method for encoding a value of an ASN.1 type to a target output stream. |
protected void |
printArcs(int[] arcs,
java.lang.String name)
|
protected void |
printDefaultValue(ASN1Value value,
Field fieldInfo)
|
void |
setUseNamedIntegers(boolean b)
|
void |
setWriteProlog(boolean b)
|
java.lang.Object |
visit(ASN1BitString value,
java.lang.Object object)
Currently we only support the basic BIT STRING type, no NamedBitList toolkit support at this point in time. |
java.lang.Object |
visit(ASN1BMPString value,
java.lang.Object object)
An ASN.1 type BMPString visit method with value and
object parameters. |
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(ASN1GeneralString value,
java.lang.Object object)
An ASN.1 type GeneralString visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1IA5String value,
java.lang.Object object)
An ASN.1 type IA5String 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(ASN1ISO646String value,
java.lang.Object object)
An ASN.1 type ISO646String visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1Null value,
java.lang.Object object)
An ASN.1 type NULL visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1NumericString value,
java.lang.Object object)
An ASN.1 type NumericString visit method with value and
object parameters. |
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(ASN1PrintableString value,
java.lang.Object object)
An ASN.1 type PrintableString visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1RelativeOID value,
java.lang.Object object)
We always encode the value of an OBJECT-IDENTIFIER using the XMLNumberForm ( dot notation ). |
java.lang.Object |
visit(ASN1Sequence value,
java.lang.Object object)
BXER: Components of a sequence which have a default value set may or may not be encoded at the sender's option. |
java.lang.Object |
visit(ASN1SequenceOf value,
java.lang.Object object)
An ASN.1 SEQUENCE OF type visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1SetOf value,
java.lang.Object object)
An ASN.1 SET OF type visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1T61String value,
java.lang.Object object)
An ASN.1 type T61String visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1TeletexString value,
java.lang.Object object)
An ASN.1 type TeletexString visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1UniversalString value,
java.lang.Object object)
An ASN.1 type UniversalString visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1UTF8String value,
java.lang.Object object)
An ASN.1 type UTF8String visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1VideotexString value,
java.lang.Object object)
An ASN.1 type VideotexString visit method with value and
object parameters. |
java.lang.Object |
visit(ASN1VisibleString value,
java.lang.Object object)
An ASN.1 type VisibleString visit method with value and
object parameters. |
java.lang.Object |
visit(XEROctetString value,
java.lang.Object object)
TODO: description goes here |
protected void |
writeProlog()
The prolog is not required, but we default to writing it into the encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XmlWriter _output
protected boolean _useNamedIntegers
protected GeneralizedTimeFormat _gtFormat
protected BinaryFormat _binaryFormat
protected java.lang.String _curXmlFormat
protected Schema _currentSchema
protected Type _type
protected java.lang.StringBuffer _buffer
| Constructor Detail |
|---|
public BXEREncoder()
| Method Detail |
|---|
public void setWriteProlog(boolean b)
public void setUseNamedIntegers(boolean b)
public void encode(ASN1Value value,
java.io.OutputStream out)
throws EncodingException
Encoder
encode in class Encodervalue - the value of an ASN.1 type to be encodedout - target of an encoding transform
EncodingExceptionprotected XmlWriter createXmlWriter(java.io.OutputStream out)
protected void writeProlog()
public java.lang.Object visit(ASN1Boolean value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - 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
visit in interface ValueVisitorvalue - a value of ASN.1 type BIT STRING in its encoded formobject - visit an object of ASN.1 type BIT STRING
VisitorException
public java.lang.Object visit(ASN1Choice value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - 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 ValueVisitorvalue - 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 ValueVisitorvalue - 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 ValueVisitorvalue - 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(ASN1Null value,
java.lang.Object object)
throws VisitorException
ValueVisitorNULL visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type NULL in its encoded formobject - visit an object of ASN.1 type NULL
VisitorException
public java.lang.Object visit(ASN1ObjectIdentifier value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - 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 ValueVisitorvalue - 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(XEROctetString value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - a value of ASN.1 type OCTET STRING in its XER 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 ValueVisitorvalue - 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(ASN1Sequence value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - a value of ASN.1 type SEQUENCE in its encoded formobject - visit an object of ASN.1 type SEQUENCE
VisitorException
public java.lang.Object visit(ASN1SequenceOf value,
java.lang.Object object)
throws VisitorException
ValueVisitorSEQUENCE OF type visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type SEQUENCE OF in its encoded formobject - visit an object of ASN.1 type SEQUENCE OF
VisitorException
public java.lang.Object visit(ASN1SetOf value,
java.lang.Object object)
throws VisitorException
ValueVisitorSET OF type visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type SET OF in its encoded formobject - visit an object of ASN.1 type SET OF
VisitorException
public java.lang.Object visit(ASN1OpenType value,
java.lang.Object object)
throws VisitorException
visit in interface ValueVisitorvalue - a value of an ASN.1 type in its encoded form (an open type)object - visit an object of the ASN.1 open type
VisitorException
public java.lang.Object visit(ASN1VisibleString value,
java.lang.Object object)
throws VisitorException
ValueVisitorVisibleString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type VisibleString in its encoded formobject - visit an object of ASN.1 type VisibleString
VisitorException
protected void printDefaultValue(ASN1Value value,
Field fieldInfo)
throws EncodingException
EncodingException
protected void printArcs(int[] arcs,
java.lang.String name)
public java.lang.Object visit(ASN1BMPString value,
java.lang.Object object)
throws VisitorException
ValueVisitorBMPString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type BMPString in its encoded formobject - visit an object of ASN.1 type BMPString
VisitorException
public java.lang.Object visit(ASN1GeneralString value,
java.lang.Object object)
throws VisitorException
ValueVisitorGeneralString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type GeneralString in its encoded formobject - visit an object of ASN.1 type GeneralString
VisitorException
public java.lang.Object visit(ASN1IA5String value,
java.lang.Object object)
throws VisitorException
ValueVisitorIA5String visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type IA5String in its encoded formobject - visit an object of ASN.1 type IA5String
VisitorException
public java.lang.Object visit(ASN1ISO646String value,
java.lang.Object object)
throws VisitorException
ValueVisitorISO646String visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type ISO646String in its encoded formobject - visit an object of ASN.1 type ISO646String
VisitorException
public java.lang.Object visit(ASN1NumericString value,
java.lang.Object object)
throws VisitorException
ValueVisitorNumericString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type NumericString in its encoded formobject - visit an object of ASN.1 type NumericString
VisitorException
public java.lang.Object visit(ASN1PrintableString value,
java.lang.Object object)
throws VisitorException
ValueVisitorPrintableString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type PrintableString in its encoded formobject - visit an object of ASN.1 type PrintableString
VisitorException
public java.lang.Object visit(ASN1T61String value,
java.lang.Object object)
throws VisitorException
ValueVisitorT61String visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type T61String in its encoded formobject - visit an object of ASN.1 type T61String
VisitorException
public java.lang.Object visit(ASN1TeletexString value,
java.lang.Object object)
throws VisitorException
ValueVisitorTeletexString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type TeletexString in its encoded formobject - visit an object of ASN.1 type TeletexString
VisitorException
public java.lang.Object visit(ASN1UniversalString value,
java.lang.Object object)
throws VisitorException
ValueVisitorUniversalString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type UniversalString in its encoded formobject - visit an object of ASN.1 type UniversalString
VisitorException
public java.lang.Object visit(ASN1UTF8String value,
java.lang.Object object)
throws VisitorException
ValueVisitorUTF8String visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type UTF8String in its encoded formobject - visit an object of ASN.1 type UTF8String
VisitorException
public java.lang.Object visit(ASN1VideotexString value,
java.lang.Object object)
throws VisitorException
ValueVisitorVideotexString visit method with value and
object parameters.
visit in interface ValueVisitorvalue - a value of ASN.1 type VideotexString in its encoded formobject - visit an object of ASN.1 type VideotexString
VisitorException
|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||