XCMS Toolkit

schemajic.codec
Class Codec

java.lang.Object
  extended by schemajic.codec.Codec
Direct Known Subclasses:
BXERCodec, CXERCodec, DERCodec

public abstract class Codec
extends java.lang.Object

Models the abstract concept of an ASN.1 codec (coder-decoder), which is an abstract device capable of performing the encoding or decoding transformation of a value of an ASN.1 type.

Version:
1.00 - 2005/09/24
Author:
support@phillipgriffin.com

Constructor Summary
Codec(EncodingRule rule)
          Constructor for Codec.
 
Method Summary
abstract  ASN1OpenType createOpenType(ASN1Value decodedValue)
           
 void decode(byte[] in, ASN1Value out)
          Decodes a value of some ASN.1 type.
 void decode(java.io.InputStream in, ASN1Value out)
          The decode method with input stream and ASN.1 value parameters ??? TEXT ???.
 byte[] encode(ASN1Value in)
          Encodes the value of some ASN.1 type.
 void encode(ASN1Value in, java.io.OutputStream out)
          The encode method with ASN.1 value and output stream parameters ??? TEXT ???.
protected abstract  Decoder getDecoder()
           
protected abstract  Encoder getEncoder()
           
 EncodingRule getEncodingRule()
          The getEncodingRule method gets the current ASN.1 encoding rule being used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codec

public Codec(EncodingRule rule)
Constructor for Codec.

Method Detail

getEncodingRule

public EncodingRule getEncodingRule()
The getEncodingRule method gets the current ASN.1 encoding rule being used.

Returns:
the ASN.1 encoding rule currently being used

encode

public void encode(ASN1Value in,
                   java.io.OutputStream out)
            throws EncodingException
The encode method with ASN.1 value and output stream parameters ??? TEXT ???.

Parameters:
in -
out -
Throws:
EncodingException

decode

public void decode(java.io.InputStream in,
                   ASN1Value out)
            throws DecodingException
The decode method with input stream and ASN.1 value parameters ??? TEXT ???.

Parameters:
in -
out -
Throws:
DecodingException

encode

public byte[] encode(ASN1Value in)
              throws EncodingException
Encodes the value of some ASN.1 type.

Parameters:
in - an ASN.1 value to be encoded
Returns:
the encoded bytes
Throws:
EncodingException

decode

public void decode(byte[] in,
                   ASN1Value out)
            throws DecodingException
Decodes a value of some ASN.1 type.

Parameters:
in - input stream bytes to be decoded
out - a decoded ASN.1 value
Throws:
DecodingException

getEncoder

protected abstract Encoder getEncoder()

getDecoder

protected abstract Decoder getDecoder()

createOpenType

public abstract ASN1OpenType createOpenType(ASN1Value decodedValue)
Parameters:
decodedValue -

XCMS Toolkit


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