]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
use buffered stream and close at the end
authorKeiron Liddle <keiron@apache.org>
Mon, 4 Mar 2002 08:22:27 +0000 (08:22 +0000)
committerKeiron Liddle <keiron@apache.org>
Mon, 4 Mar 2002 08:22:27 +0000 (08:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194688 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/apps/CommandLineStarter.java

index c7d46329054d923af0b5b44bf1f2bee57308ac99..c2d34c3c2cfada450c3f32827bd2e1ed66b13637 100644 (file)
@@ -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) {