public void writeTo(File file) throws FileNotFoundException {
  try (PrintWriter writer=new PrintWriter(new OutputStreamWriter(new FileOutputStream(file),StandardCharsets.ISO_8859_1))){
    for (    Line line : lines) {
      writer.println(line.toString());
    }
  }
 }

public void writeTo ( File file ) throws FileNotFoundException { try ( PrintWriter writer = new PrintWriter ( new OutputStreamWriter ( new FileOutputStream ( file ) , StandardCharsets . ISO_8859_1 ) ) ) { for ( Line line : lines ) { writer . println ( line . toString ( ) ) ; } } }
writes this eclipse . ini out to a file .
