aboutsummaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-03-04 08:22:27 +0000
committerKeiron Liddle <keiron@apache.org>2002-03-04 08:22:27 +0000
commit45eed66a318f0ed8a384c49f3441e189cecd0447 (patch)
treea59b20f9cdbeffa8d18801759d2c7810ead4dd96 /src/org
parentbef234feb37d5ea2e5124bc86121183e887a3a30 (diff)
downloadxmlgraphics-fop-45eed66a318f0ed8a384c49f3441e189cecd0447.tar.gz
xmlgraphics-fop-45eed66a318f0ed8a384c49f3441e189cecd0447.zip
use buffered stream and close at the end
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194688 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org')
-rw-r--r--src/org/apache/fop/apps/CommandLineStarter.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/apache/fop/apps/CommandLineStarter.java b/src/org/apache/fop/apps/CommandLineStarter.java
index c7d463290..c2d34c3c2 100644
--- a/src/org/apache/fop/apps/CommandLineStarter.java
+++ b/src/org/apache/fop/apps/CommandLineStarter.java
@@ -65,11 +65,13 @@ public class CommandLineStarter extends Starter {
try {
driver.setRenderer(commandLineOptions.getRenderer());
- driver.setOutputStream( new FileOutputStream(
+ BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(
commandLineOptions.getOutputFile()));
+ driver.setOutputStream(bos);
driver.getRenderer().setOptions(
commandLineOptions.getRendererOptions());
driver.render(parser, inputHandler.getInputSource());
+ bos.close();
System.exit(0);
} catch (Exception e) {
if (e instanceof FOPException) {