public class TLVList extends java.lang.Object implements java.io.Serializable, Loggeable
Constructor and Description |
---|
TLVList() |
Modifier and Type | Method and Description |
---|---|
void |
append(int tag,
byte[] value)
Append TLVMsg to the TLVList
|
void |
append(int tag,
java.lang.String value)
Append TLVMsg to the TLVList
|
void |
append(TLVMsg tlvToAppend)
Append TLVMsg to the TLVList
|
void |
deleteByIndex(int index)
delete the specified TLV from the list using a Zero based index
|
void |
deleteByTag(int tag)
Delete the specified TLV from the list by tag value
|
void |
dump(java.io.PrintStream p,
java.lang.String indent) |
java.util.Enumeration |
elements() |
TLVMsg |
find(int tag)
searches the list for a specified tag and returns a TLV object
|
int |
findIndex(int tag)
searches the list for a specified tag and returns a zero based index for
that tag
|
TLVMsg |
findNextTLV()
Return the next TLVMsg of same TAG value
|
java.lang.String |
getString(int tag)
searches the list for a specified tag and returns a hex String
|
java.util.List<TLVMsg> |
getTags() |
protected TLVMsg |
getTLVMsg(int tag,
byte[] arrValue) |
byte[] |
getValue(int tag)
searches the list for a specified tag and returns it raw
|
protected int |
getValueLength(java.nio.ByteBuffer buffer)
Read length bytes and return the int value
|
boolean |
hasTag(int tag)
searches the list for a specified tag and returns a boolean indicating presence
|
TLVMsg |
index(int index)
Returns a TLV object which represents the TLVMsg stored within the TLVList
at the given 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
|
public void unpack(byte[] buf) throws ISOException
buf
- - raw messageISOException
public java.util.List<TLVMsg> getTags()
public java.util.Enumeration elements()
public void unpack(byte[] buf, int offset) throws ISOException
buf
- - raw messageoffset
- theoffsetISOException
public void append(TLVMsg tlvToAppend)
public void append(int tag, byte[] value)
tag
- tag idvalue
- tag valuepublic void append(int tag, java.lang.String value)
tag
- idvalue
- in hexadecimal character representationpublic void deleteByIndex(int index)
index
- numberpublic void deleteByTag(int tag)
tag
- idpublic TLVMsg find(int tag)
tag
- idpublic int findIndex(int tag)
public TLVMsg findNextTLV()
public TLVMsg index(int index)
index
- numberpublic byte[] pack()
protected TLVMsg getTLVMsg(int tag, byte[] arrValue)
protected int getValueLength(java.nio.ByteBuffer buffer)
buffer
- bufferpublic java.lang.String getString(int tag)
tag
- idpublic byte[] getValue(int tag)
tag
- idpublic boolean hasTag(int tag)