public static void dump(OutputStream w, NodeTable nodeTable)
{
// Better to hack the indexes?
Iterator<Pair<NodeId, Node>> iter = nodeTable.all() ;
long count = 0 ;
IndentedWriter iw = new IndentedWriter(w) ;
for ( ; iter.hasNext() ; )
{
Pair<NodeId, Node> pair = iter.next() ;
iw.print(pair.car()) ;
iw.print(" : ") ;
//iw.print(pair.cdr()) ;
Node n = pair.cdr() ;
String $ = stringForNode(n) ;
iw.print($) ;
iw.println() ;
count++ ;
}
iw.println() ;
iw.printf("Total: "+count) ;
iw.println() ;
iw.flush() ;
}