|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ximpleware.NodeRecorder
public class NodeRecorder
Node record allows one to record the node position of VTDNav. You can store/load multiple node position using NodeRecorder, which is also more spatially efficient than . However, the internal representation of node is variable in length and recording a large number of nodes could consume much memory. It is a bad idea to record every node of an document. So be careful when using it.
| Field Summary | |
|---|---|
static int |
BUF_SZ_EXPO
|
protected FastIntBuffer |
fib
|
protected VTDNav |
vn
|
| Constructor Summary | |
|---|---|
NodeRecorder()
The parameter-less constructor |
|
NodeRecorder(VTDNav vn1)
|
|
| Method Summary | |
|---|---|
void |
bind(VTDNav vn1)
|
void |
clear()
Clear will erase all the nodes, internal buffers are reused |
int |
iterate()
This method set the cursor in VTDNav to the nodes as recorded in NodeRecorder, and return the output of "getCurrentIndex()" It is important to notice that you can only go forward, not backward |
void |
record()
This function records the position of VN into the internal buffer |
void |
resetPointer()
resetPointer() will set the pointer to the first node in NodeRecorder This method is called when one wants to read the nodes in the nodeRecorder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected VTDNav vn
protected FastIntBuffer fib
public static final int BUF_SZ_EXPO
| Constructor Detail |
|---|
public NodeRecorder()
public NodeRecorder(VTDNav vn1)
vn1 - | Method Detail |
|---|
public void bind(VTDNav vn1)
public void record()
public void resetPointer()
public void clear()
public int iterate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||