private void sortAndPrintIndex(Template tmpl, Vector list, String file, String field) { PrintWriter detfile; list.sort(new HTMLComparer(field), false); try { detfile = new PrintWriter(new BufferedWriter(new FileWriter(file))); detfile.print(tmpl.output()); detfile.close(); } catch (IOException e) { Vm.debug("Problem writing HTML files\n"); e.printStackTrace(); } }
private void sortAndPrintIndex( Template tmpl, Vector list, String file, String field, double diff) { Vector navi_index; PrintWriter detfile; list.sort(new HTMLComparer(field), false); navi_index = addAnchorString(list, field, diff); if (navi_index != null) { tmpl.setParam("navi_index", navi_index); } try { detfile = new PrintWriter(new BufferedWriter(new FileWriter(file))); detfile.print(tmpl.output()); detfile.close(); } catch (IOException e) { Vm.debug("Problem writing HTML files\n"); e.printStackTrace(); } }