XCMS Toolkit

schemajic.encoder
Class TLV

java.lang.Object
  extended by schemajic.encoder.TLV
Direct Known Subclasses:
AtomicValue, CompositeValue, OpenTypeValue, TaggedAnyValue

public abstract class TLV
extends java.lang.Object

Models the abstract concept of the encoding of a value of an ASN.1 type represented in conceptual Tag - Length - Value (TLV) format.

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

Field Summary
protected  LengthEncoder _lengthEncoder
           
protected  int _pc
           
protected  TagEncoder _tagEncoder
           
protected  int _tagLength
           
protected  TagList _tags
           
protected  Type _type
           
 
Constructor Summary
TLV(Type type, TagList tags, int pc, TagEncoder tagEncoder, LengthEncoder lengthEncoder)
           
 
Method Summary
 void encode(java.io.OutputStream out)
           
protected  void encodeLength(java.io.OutputStream out)
           
protected  void encodeTags(java.io.OutputStream out)
           
protected  byte[] getEncodedLength()
           
protected  byte[] getEncodedTags()
           
 int getTagLength()
          Returns the length component of a TLV encoding.
 TagList getTags()
           
 int getTotalLength()
           
abstract  int getValueLength()
          Models the abstract concept of the lenght of the value component of a TLV encoding.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_type

protected Type _type

_tags

protected TagList _tags

_tagLength

protected int _tagLength

_pc

protected int _pc

_tagEncoder

protected TagEncoder _tagEncoder

_lengthEncoder

protected LengthEncoder _lengthEncoder
Constructor Detail

TLV

public TLV(Type type,
           TagList tags,
           int pc,
           TagEncoder tagEncoder,
           LengthEncoder lengthEncoder)
Method Detail

getTags

public TagList getTags()

getTagLength

public int getTagLength()
Returns the length component of a TLV encoding.


getValueLength

public abstract int getValueLength()
Models the abstract concept of the lenght of the value component of a TLV encoding.


getTotalLength

public int getTotalLength()

encode

public void encode(java.io.OutputStream out)
            throws EncodingException
Throws:
EncodingException

getEncodedTags

protected byte[] getEncodedTags()

encodeTags

protected void encodeTags(java.io.OutputStream out)
                   throws EncodingException
Throws:
EncodingException

getEncodedLength

protected byte[] getEncodedLength()

encodeLength

protected void encodeLength(java.io.OutputStream out)
                     throws EncodingException
Throws:
EncodingException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

XCMS Toolkit


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