org.jpos.tlv
Class TLVList

java.lang.Object
  extended by org.jpos.tlv.TLVList
All Implemented Interfaces:
Serializable

public class TLVList
extends Object
implements Serializable

Author:
bharavi
See Also:
Serialized Form

Constructor Summary
TLVList()
          empty constructor
 
Method Summary
 void append(int tag, byte[] value)
          Append TLVMsg to the TLVList
 void append(int tag, String value)
          Append TLVMsg to the TLVList
 void append(TLVMsg tlvToAppend)
          Append TLVMsg to the TLVList
 void deleteByIndex(int index)
           
 void deleteByTag(int tag)
           
 Enumeration elements()
          return an enumeration of the Vector of tags.
 TLVMsg find(int tag)
           
 int findIndex(int tag)
           
 TLVMsg findNextTLV()
           
 String getString(int tag)
           
protected  TLVMsg getTLVMsg(int tag, byte[] arrValue)
           
 byte[] getValue(int tag)
           
protected  int getValueLength(ByteBuffer buffer)
           
 boolean hasTag(int tag)
           
 TLVMsg index(int index)
           
 byte[] pack()
          pack the TLV message (BER-TLV Encoding)
 void unpack(byte[] buf)
          unpack a message
 void unpack(byte[] buf, int offset)
          unpack a message with a starting offset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLVList

public TLVList()
empty constructor

Method Detail

unpack

public void unpack(byte[] buf)
            throws ISOException
unpack a message

Parameters:
buf - - raw message
Throws:
ISOException

elements

public Enumeration elements()
return an enumeration of the Vector of tags.


unpack

public void unpack(byte[] buf,
                   int offset)
            throws ISOException
unpack a message with a starting offset

Parameters:
buf - - raw message
Throws:
ISOException

append

public void append(TLVMsg tlvToAppend)
Append TLVMsg to the TLVList

Parameters:
TLVMsg -

append

public void append(int tag,
                   byte[] value)
Append TLVMsg to the TLVList

Parameters:
TAG -
value -

append

public void append(int tag,
                   String value)
Append TLVMsg to the TLVList

Parameters:
TAG -
value - in hexadecimal character representation

deleteByIndex

public void deleteByIndex(int index)

deleteByTag

public void deleteByTag(int tag)

find

public TLVMsg find(int tag)

findIndex

public int findIndex(int tag)

findNextTLV

public TLVMsg findNextTLV()

index

public TLVMsg index(int index)

pack

public byte[] pack()
pack the TLV message (BER-TLV Encoding)

Returns:
the packed message

getTLVMsg

protected TLVMsg getTLVMsg(int tag,
                           byte[] arrValue)

getValueLength

protected int getValueLength(ByteBuffer buffer)

getString

public String getString(int tag)

getValue

public byte[] getValue(int tag)

hasTag

public boolean hasTag(int tag)


Copyright © 1998-2012 jPOS.org. All Rights Reserved.