public void save(String fileName)
      throws FileNotFoundException, UnsupportedEncodingException {
    try (PrintWriter writer = new PrintWriter(fileName, "UTF-8")) {
      for (Map.Entry<String, Integer> entry : data.entrySet()) {
        writer.println(String.format("%d;%s", entry.getValue(), entry.getKey()));
      }
    }
  }
public void save ( String fileName ) throws FileNotFoundException , UnsupportedEncodingException { try ( PrintWriter writer = new PrintWriter ( fileName , "UTF-8" ) ) { for ( Map . Entry < String , Integer > entry : data . entrySet ( ) ) { writer . println ( String . format ( "%d;%s" , entry . getValue ( ) , entry . getKey ( ) ) ) ; } } }
Save the abbreviations into a file.

@param fileName The file name.

@throws FileNotFoundException
@throws UnsupportedEncodingException