public static class TlvBufferUtils.TlvIterable extends Object implements Iterable<TlvBufferUtils.TlvElement>
Constructor and Description |
---|
TlvIterable(int typeSize,
int lengthSize,
byte[] array,
int length)
Constructs a TlvIterable object - specifying the format of the TLV
(the sizes of the Type and Length fields), and the byte array whose
data is to be parsed.
|
Modifier and Type | Method and Description |
---|---|
Iterator<TlvBufferUtils.TlvElement> |
iterator()
Returns an iterator to step through a TLV formatted byte-array.
|
String |
toString()
Prints out a parsed representation of the TLV-formatted byte array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public TlvIterable(int typeSize, int lengthSize, byte[] array, int length)
typeSize
- Number of bytes used for the Type (T) field. Valid
values are 0 (i.e. indicating the format is LV rather than
TLV), 1, and 2 bytes.lengthSize
- Number of bytes sued for the Length (L) field.
Values values are 1 or 2 bytes.array
- The TLV formatted byte-array to parse.length
- The number of bytes of the array to be used in the
parsing.public String toString()
public Iterator<TlvBufferUtils.TlvElement> iterator()
TlvBufferUtils.TlvElement
.iterator
in interface Iterable<TlvBufferUtils.TlvElement>