com.ximpleware.extended
Class NodeRecorderHuge

java.lang.Object
  extended by com.ximpleware.extended.NodeRecorderHuge

public class NodeRecorderHuge
extends Object

NodeRecorderHuge allows one to record the node position of VTDNavHuge. 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  VTDNavHuge vn
           
 
Constructor Summary
NodeRecorderHuge()
          The parameter-less constructor
NodeRecorderHuge(VTDNavHuge vn1)
           
 
Method Summary
 void bind(VTDNavHuge 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 an 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

vn

protected VTDNavHuge vn

fib

protected FastIntBuffer fib

BUF_SZ_EXPO

public static final int BUF_SZ_EXPO
See Also:
Constant Field Values
Constructor Detail

NodeRecorderHuge

public NodeRecorderHuge()
The parameter-less constructor


NodeRecorderHuge

public NodeRecorderHuge(VTDNavHuge vn1)
Parameters:
vn1 -
Method Detail

bind

public void bind(VTDNavHuge vn1)

record

public void record()
This function records the position of VN into an internal buffer


resetPointer

public 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


clear

public void clear()
Clear will erase all the nodes, internal buffers are reused


iterate

public 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

Returns:
int


Copyright © 2013. All Rights Reserved.