public void dumpContext ( PrintWriter writer ) { try { NamingEnumeration < NameClassPair > list = context . list ( "/" ) ; writer . print ( "\n{\n name: \"" ) ; /*writer.print(this.namespace); writer.print(" ");*/ writer . print ( this . root ) ; writer . println ( "\",\n children: [" ) ; enumerate ( list , "/" , writer ) ; writer . println ( "]}" ) ; writer . flush ( ) ; } catch ( NamingException e ) { e . printStackTrace ( writer ) ; } }
dump the current context to a PrintWriter