/** * Save the INI to a file using the given encoding. * * @param file the file to load * @param encoding the encoding of the file * @throws IOException */ public void save(File file, String encoding) throws IOException { Writer out = null; try { out = new OutputStreamWriter(new FileOutputStream(file), encoding); save(out); } finally { if (out != null) { out.close(); out = null; } } }