code: public static <E> void saveCounter(Counter<E> c, String filename) throws IOException {
      FileOutputStream fos = new FileOutputStream(filename);
      saveCounter(c, fos);
      fos.close();
    }
docs: Saves a Counter to a text file. Counter written as one key/count pair per
  line, separated by whitespace.