Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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());
   }
 }