import java.io.StringReader;
import java.io.FileWriter;
import java.io.PrintWriter;
+import java.io.BufferedWriter;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.net.URL;
driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
- driver.setWriter(new PrintWriter(new FileWriter(args[2])));
+ PrintWriter pwriter = new PrintWriter(new BufferedWriter(new FileWriter(args[2])));
+ driver.setWriter(pwriter);
driver.buildFOTree(parser, new InputSource(reader));
reader.close();
driver.format();
if (usefile) {
new File (args[2] + ".tmp").delete();
}
+ pwriter.flush();
+ pwriter.close();
}
catch (Exception e) {
MessageHandler.errorln("FATAL ERROR: " + e.getMessage());