public class JBerdNode
extends java.lang.Object
Jberd decoder each time a TLV is encounterd
It contains the detail of the TLV and is passed to the JberdHandler
during decoding. As decoding proceeds the parent-child structure of the
BER input is reflected in a structure of such nodes.| Modifier and Type | Field and Description |
|---|---|
protected BERclass |
bclass
The node's
BERclass |
protected BERlength |
blentype
the node's
BERlength encoding |
protected BERtype |
btype
The node's
BERtype |
protected int |
depth
the number of levels of hierarchy below the root
|
protected JBerdNode |
par
The node's parent node
|
protected int |
tag
the node's tag
|
| Constructor and Description |
|---|
JBerdNode(int tg)
Creates a node on the basis of a tag.
|
JBerdNode(int tg,
BERclass cl,
BERtype ty,
BERlength lt)
Creates a node with a specific tag and other BER properties
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(JBerdNode child)
adds a given node as a child
|
BERclass |
getBERclass() |
BERlength |
getBERlength() |
BERtype |
getBERtype() |
JBerdNode |
getChild(int tag)
Returns the child node for the given tag.
|
JBerdNode |
getChild(int tag,
BERclass cl,
BERtype ty,
BERlength lt)
Returns the child node for the given tag.
|
int |
getDepth() |
JBerdTagPath |
getPath() |
int |
getTag() |
boolean |
hasChild(int tag)
checks whether a child with a given tag exists
|
void |
setBERClass(BERclass c)
Sets the node's
BERclass to the given value |
void |
setBERlength(BERlength l)
Sets the node's
BERlength endcoding |
void |
setBERtype(BERtype t)
Sets the node's
BERclass to the given value |
protected JBerdNode par
protected int tag
protected int depth
public JBerdNode(int tg)
Jberd
decoder as it proceeds through the input BER stream. Further a root node
with a tag of 0 may be created prior to decoding and passed to the decoder.tg - the tagpublic int getDepth()
public JBerdTagPath getPath()
JBerdTagPath of the nodepublic int getTag()
public JBerdNode getChild(int tag)
tag - the tagpublic boolean hasChild(int tag)
tag - the tagpublic void addChild(JBerdNode child)
child - the child to addpublic void setBERClass(BERclass c)
BERclass to the given valuec - BERclass value to setpublic void setBERtype(BERtype t)
BERclass to the given valuet - BERtype value to set