XCMS Toolkit

schemajic.codec
Class Printer

java.lang.Object
  extended by schemajic.codec.Encoder
      extended by schemajic.encoder.BXEREncoder
          extended by schemajic.codec.Printer
All Implemented Interfaces:
ValueVisitor

public class Printer
extends BXEREncoder

Pretty-prints an ASN.1 value using an enhanced BXER format that extends the ASN.1 XML Encoding rules for benefit of a human markup reader.

Version:
1.01 - 2006/01/12
Author:
support@phillipgriffin.com

Field Summary
 
Fields inherited from class schemajic.encoder.BXEREncoder
_binaryFormat, _buffer, _currentSchema, _curXmlFormat, _gtFormat, _output, _type, _useNamedIntegers
 
Constructor Summary
Printer()
           
 
Method Summary
static void println(ASN1Value v)
           
 java.lang.Object visit(ASN1ObjectIdentifier value, java.lang.Object object)
          We always encode the value of an OBJECT-IDENTIFIER using the XMLNumberForm ( dot notation ).
 
Methods inherited from class schemajic.encoder.BXEREncoder
createXmlWriter, encode, printArcs, printDefaultValue, setUseNamedIntegers, setWriteProlog, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, writeProlog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Printer

public Printer()
Method Detail

println

public static void println(ASN1Value v)
                    throws EncodingException
Throws:
EncodingException

visit

public java.lang.Object visit(ASN1ObjectIdentifier value,
                              java.lang.Object object)
                       throws VisitorException
We always encode the value of an OBJECT-IDENTIFIER using the XMLNumberForm ( dot notation ). i.e.: 1.2.3.4.

Since this is a NON-XER compliant pretty print version of BXER we add comments to include the arc names if present (e.g., known to this toolkit).

Specified by:
visit in interface ValueVisitor
Overrides:
visit in class BXEREncoder
Parameters:
value - a value of ASN.1 type OBJECT IDENTIFIER in its encoded form
object - visit an object of ASN.1 type OBJECT IDENTIFIER
Throws:
VisitorException

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.