public static void printKeyValues(String k, List<String> v, PrintStream ps) { ps.print(k + " => "); boolean first = true; for (String val : v) { if (!first) { ps.print(", "); } first = false; ps.print(val); } ps.println(); }
public void toFile(String file) { try { PrintStream ps = new PrintStream(new FileOutputStream(file), true); ps.print(sw.toString()); } catch (Exception e) { System.err.println(e.toString()); } }