public abstract class TlvInfo<I extends TlvInfo<I,?,H>,V,H extends TlvHeader>
extends java.lang.Object
implements java.lang.Iterable<I>
Modifier and Type | Field and Description |
---|---|
protected I[] |
children |
protected java.util.List<I> |
childrenList |
protected java.util.Map<java.lang.Integer,I> |
childrenMap |
java.lang.String |
name |
protected java.util.Map<java.lang.String,I> |
nameChildrenMap |
protected int |
paramLengthLength |
protected int |
paramTypeLength |
protected I |
parent |
int |
type |
static int |
TYPE_ABINARY |
static int |
TYPE_BYTE |
static int |
TYPE_DOUBLE |
static int |
TYPE_FLOAT |
static int |
TYPE_INTEGER |
static int |
TYPE_IPADDR |
static int |
TYPE_IPV6ADDR |
static int |
TYPE_IPV6PREFIX |
static int |
TYPE_LONG |
static int |
TYPE_OCTETS |
static int |
TYPE_SHORT |
static int |
TYPE_STRING |
static int |
TYPE_TLV |
int |
valueType |
Constructor and Description |
---|
TlvInfo(java.lang.Class<?> clazz,
int type,
java.lang.String name,
int valueType,
int paramTypeSize,
int paramLengthSize,
java.util.List<I> children) |
Modifier and Type | Method and Description |
---|---|
I |
getChild(int type) |
I |
getChild(java.lang.String name) |
java.util.Iterator<I> |
iterator() |
abstract Tlv<?,?> |
read(java.nio.ByteBuffer bb,
H header) |
void |
readTypeLength(java.nio.ByteBuffer bb,
H header,
int parentLength,
boolean headerInLength)
Считывание типа и длины.
|
void |
setParent(I parent) |
protected java.nio.ByteBuffer |
sliceData(java.nio.ByteBuffer bb,
int length)
Получения ByteBuffer содержащего data
|
abstract V |
unwrapValue(java.nio.ByteBuffer data) |
java.lang.String |
valueToString(Tlv<?,V> attribute) |
abstract java.nio.ByteBuffer |
wrapValue(V value) |
public static final int TYPE_OCTETS
public static final int TYPE_STRING
public static final int TYPE_LONG
public static final int TYPE_INTEGER
public static final int TYPE_SHORT
public static final int TYPE_BYTE
public static final int TYPE_DOUBLE
public static final int TYPE_FLOAT
public static final int TYPE_TLV
public static final int TYPE_IPADDR
public static final int TYPE_ABINARY
public static final int TYPE_IPV6ADDR
public static final int TYPE_IPV6PREFIX
protected final int paramTypeLength
protected final int paramLengthLength
public final int type
public final java.lang.String name
public final int valueType
public TlvInfo(java.lang.Class<?> clazz, int type, java.lang.String name, int valueType, int paramTypeSize, int paramLengthSize, java.util.List<I> children)
public void setParent(I parent)
public I getChild(int type)
public I getChild(java.lang.String name)
public java.util.Iterator<I> iterator()
public abstract V unwrapValue(java.nio.ByteBuffer data)
public abstract java.nio.ByteBuffer wrapValue(V value)
protected final java.nio.ByteBuffer sliceData(java.nio.ByteBuffer bb, int length)
bb
- length
- public void readTypeLength(java.nio.ByteBuffer bb, H header, int parentLength, boolean headerInLength)
bb
- header
- parentLength
- headerInLength
-