/** * Writes this instance in INI format to an output stream writer. * * @param streamWriter where to write * @throws IOException at an I/O problem */ public void save(OutputStreamWriter streamWriter) throws IOException { Iterator<String> it = this.sectionOrder.iterator(); PrintWriter writer = new PrintWriter(streamWriter, true); while (it.hasNext()) { Section sect = getSection(it.next()); writer.println(sect.header()); sect.save(writer); } }