XCMS Toolkit

schemajic.encoder
Class DefiniteFormEncoder

java.lang.Object
  extended by schemajic.encoder.DefiniteFormEncoder
All Implemented Interfaces:
LengthEncoder

public class DefiniteFormEncoder
extends java.lang.Object
implements LengthEncoder

Encodes definite form short and long lengths.

TODO: Make this class a Singleton.

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

Constructor Summary
DefiniteFormEncoder()
           
 
Method Summary
 int calcLengthOfLength(int length)
          Calculates the length of the length of the value (the length of the length octets) from a provided integer value.
 void encode(int length, java.io.OutputStream out)
          Defines a method to encode length octets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefiniteFormEncoder

public DefiniteFormEncoder()
Method Detail

encode

public void encode(int length,
                   java.io.OutputStream out)
            throws EncodingException
Description copied from interface: LengthEncoder
Defines a method to encode length octets.

Specified by:
encode in interface LengthEncoder
Parameters:
length - length of the length octets
out - a target encoding output stream
Throws:
EncodingException

calcLengthOfLength

public int calcLengthOfLength(int length)
Calculates the length of the length of the value (the length of the length octets) from a provided integer value.

Specified by:
calcLengthOfLength in interface LengthEncoder
Parameters:
length - length of the length octets

XCMS Toolkit


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