public void toIdFile ( OutputStream os ) throws IOException { BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( os ) ) ; for ( TrieNodeData < T > child : root . children . values ( ) ) { child . writeIds ( writer , new char [ 0 ] ) ; // recursive } writer . close ( ) ; }
one entry per line . word first then tab then data