public static class TlvBufferUtils.TlvElement extends Object
TlvBufferUtils.TlvIterable
to iterate over array. A TlvBufferUtils.TlvElement
represents each entry in a TLV formatted byte-array.Modifier and Type | Field and Description |
---|---|
int |
mLength
The Length (L) field of the current TLV element.
|
int |
mOffset
The offset to be used into
mRefArray to access the
raw data representing the current TLV element. |
byte[] |
mRefArray
The Value (V) field - a raw byte array representing the current TLV
element where the entry starts at
mOffset . |
int |
mType
The Type (T) field of the current TLV element.
|
Modifier and Type | Method and Description |
---|---|
byte |
getByte()
Utility function to return a byte representation of a TLV element of
length 1.
|
int |
getInt()
Utility function to return an integer representation of a TLV element
of length 4.
|
short |
getShort()
Utility function to return a short representation of a TLV element of
length 2.
|
String |
getString()
Utility function to return a String representation of a TLV element.
|
public int mType
public int mLength
public byte[] mRefArray
mOffset
.public int mOffset
mRefArray
to access the
raw data representing the current TLV element.public byte getByte()
mLength
is != 1 will result in an exception.public short getShort()
mLength
is != 2 will result in an exception.public int getInt()
mLength
is != 4 will result in an exception.public String getString()