XCMS Toolkit

schemajic.decoder
Class CXERDecoder

java.lang.Object
  extended by schemajic.codec.Decoder
      extended by schemajic.decoder.BXERDecoder
          extended by schemajic.decoder.CXERDecoder
All Implemented Interfaces:
ValueVisitor

public class CXERDecoder
extends BXERDecoder
implements ValueVisitor

Decoder for Canonical XML Encoding Rules (CXER) of ASN.1.

Version:
1.00 - 2006/02/10
Author:
support@phillipgriffin.com

Field Summary
 
Fields inherited from class schemajic.decoder.BXERDecoder
_curXmlFormat, _element, _gtFormat, _hex2bin
 
Constructor Summary
CXERDecoder()
           
 
Method Summary
 void decode(java.io.InputStream in, ASN1Value value)
          Decode an XER encoding.
 java.lang.Object visit(ASN1Boolean value, java.lang.Object object)
          An ASN.1 type BOOLEAN visit method with value and object parameters.
 java.lang.Object visit(ASN1Enumerated value, java.lang.Object object)
          The value of the element MUST be a valid constant name.
 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)
          If the string matches a constant, use the constant value, otherwise the string MUST be a valid integer.
 java.lang.Object visit(ASN1ObjectIdentifier value, java.lang.Object object)
          An ASN.1 type OBJECT IDENTIFIER visit method with value and object parameters.
 java.lang.Object visit(ASN1OctetString value, java.lang.Object object)
          The ASN.1 type OCTET STRING visit method with value and object parameters.
 java.lang.Object visit(ASN1RelativeOID value, java.lang.Object object)
          An ASN.1 type RELATIVE_OID visit method with value and object parameters.
 
Methods inherited from class schemajic.decoder.BXERDecoder
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class schemajic.codec.Decoder
getInputStream, setInputStream
 
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, visit, visit, visit
 

Constructor Detail

CXERDecoder

public CXERDecoder()
Method Detail

decode

public void decode(java.io.InputStream in,
                   ASN1Value value)
            throws DecodingException
Decode an XER encoding. This decode method expects the specified 'value' to be the same type as the value found in the XER encoding.

Overrides:
decode in class BXERDecoder
Parameters:
in - source of a decoding transform
value - the value of an ASN.1 type to be decoded
Throws:
DecodingException

visit

public java.lang.Object visit(ASN1Boolean value,
                              java.lang.Object object)
                       throws VisitorException
Description copied from interface: ValueVisitor
An ASN.1 type BOOLEAN visit method with value and object parameters.

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

visit

public java.lang.Object visit(ASN1Enumerated value,
                              java.lang.Object object)
                       throws VisitorException
The value of the element MUST be a valid constant name.

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

visit

public java.lang.Object visit(ASN1GeneralizedTime value,
                              java.lang.Object object)
                       throws VisitorException
Description copied from interface: ValueVisitor
An ASN.1 type GeneralizedTime visit method with value and object parameters.

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

visit

public java.lang.Object visit(ASN1Integer value,
                              java.lang.Object object)
                       throws VisitorException
If the string matches a constant, use the constant value, otherwise the string MUST be a valid integer.

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

visit

public java.lang.Object visit(ASN1ObjectIdentifier value,
                              java.lang.Object object)
                       throws VisitorException
Description copied from interface: ValueVisitor
An ASN.1 type OBJECT IDENTIFIER visit method with value and object parameters.

Specified by:
visit in interface ValueVisitor
Overrides:
visit in class BXERDecoder
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

visit

public java.lang.Object visit(ASN1OctetString value,
                              java.lang.Object object)
                       throws VisitorException
Description copied from interface: ValueVisitor
The ASN.1 type OCTET STRING visit method with value and object parameters.

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

visit

public java.lang.Object visit(ASN1RelativeOID value,
                              java.lang.Object object)
                       throws VisitorException
Description copied from interface: ValueVisitor
An ASN.1 type RELATIVE_OID visit method with value and object parameters.

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

XCMS Toolkit


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