XCMS Toolkit

schemajic.decoder
Class DecodedTLV

java.lang.Object
  extended by schemajic.decoder.DecodedTLV

public class DecodedTLV
extends java.lang.Object

Decodes values of ASN.1 types represented in a conceptual Tag - Length - Value (TLV) format under the Distinguished Encoding Rules (DER) of ASN.1.

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

Constructor Summary
DecodedTLV()
          Constructor for DecodedTLV.
DecodedTLV(Tag tag, int length)
          Constructor for DecodedTLV with tag and length parameters.
DecodedTLV(Tag tag, int length, byte[] data)
          Constructor for DecodedTLV with tag, length and data parameters.
 
Method Summary
 byte[] getData()
          Returns the current data value (V).
 int getLength()
          Returns the current length (L).
 Tag getTag()
          Returns the current tag (T).
 void setData(byte[] data)
          Sets the current data value (V) using the provided data.
 java.lang.String toString()
          Returns a formatted TLV string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecodedTLV

public DecodedTLV()
Constructor for DecodedTLV.


DecodedTLV

public DecodedTLV(Tag tag,
                  int length)
Constructor for DecodedTLV with tag and length parameters.

Parameters:
tag - ASN.1 encoding tag (T)
length - ASN.1 encoding length (L)

DecodedTLV

public DecodedTLV(Tag tag,
                  int length,
                  byte[] data)
Constructor for DecodedTLV with tag, length and data parameters.

Parameters:
tag - ASN.1 encoding tag (T)
length - ASN.1 encoding length (L)
data - ASN.1 encoding value (V)
Method Detail

getData

public byte[] getData()
Returns the current data value (V).

Returns:
byte[]

setData

public void setData(byte[] data)
Sets the current data value (V) using the provided data.


getLength

public int getLength()
Returns the current length (L).


getTag

public Tag getTag()
Returns the current tag (T).


toString

public java.lang.String toString()
Returns a formatted TLV string.

Overrides:
toString in class java.lang.Object

XCMS Toolkit


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