public void toFile ( File file ) throws IOException { String [ ] sitemap = toStringArray ( ) ; try ( BufferedWriter writer = new BufferedWriter ( new FileWriter ( file ) ) ) { for ( String string : sitemap ) { writer . write ( string ) ; } } }
Construct and save sitemap to output file