// It's manipulated in-place so no conversion needed,
// Just the count needs to be fixed up.
// ByteBuffer bb = node.getBackingByteBuffer() ;
// BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;
Block block = node.getBackingBlock() ;
BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;
int c = encodeCount(bType, node.getCount()) ;
block.getByteBuffer().putInt(0, c) ;
return block ;
}