* that are not <code>Strings</code>.
* @exception NullPointerException if <code>out</code> is null.
*/
public synchronized void store(OutputStream out, String header)
throws IOException {
BufferedWriter awriter;
awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
for (int i = 0; i < _infoList.size(); i++) {
Info info = (Info) _infoList.get(i);
if (info._type == Info.COMMENT) {
// Add a comment line
awriter.write(info._value);
awriter.newLine();
} else if (info._type == Info.EMPTY_LINE) {
// Add a empty line
awriter.newLine();
} else if (info._type == Info.MASTER_LINE) {
awriter.write(Info.IMPORT_FILE_PREFIX+ " "+info._value);
awriter.newLine();
} else {
// Add a property (key + value) line
String key = info._value;
String val = (String) get(key);
key = saveConvert(key, true);
/* No need to escape embedded and trailing spaces for value,
* hence pass false to flag.
*/
val = saveConvert(val, false);
awriter.write(key + "=" + val);
awriter.newLine();
}
}
awriter.flush();
}