* node.nodeNextPosition is updated to the next position after the node,
* if the node is dup_next, nodeNextPosition stored the pointer. if link
* is end, nodeNextPosition will be null.
*/
protected int getNode(DataPage dataPage, NodeInfo node) {
DataNode dupDataNode = new DataNode(dataPage, node.nodePosition.getOffsetInPage());
int nPageNo = node.nodePosition.getPageNo();
int nOffset = node.nodePosition.getOffsetInPage();
try {
byte[] data = dupDataNode.getData();
if (dupDataNode.isDupData()) {
//This node is available value
node.data = btree.decodeFromByteArray(data, null);
node.nodeNextPosition = new NodePosition(nPageNo, nOffset + dupDataNode.getNodeSpace());
return DUP_DATA;
} else if (dupDataNode.isDupNext()) {
node.data = null;
int nextOffset = ByteTool.bytesToInt(data, 0, btree.getBTreeSpec().isMsbFirst());
int nNextPageNumber = ByteTool.bytesToInt(data, 4, btree.getBTreeSpec().isMsbFirst());
if ((nextOffset == nOffset) && (nNextPageNumber == nPageNo)) {
node.nodeNextPosition = null;