diff gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java @ 73:504570de21fd

Refactoring Work depending on Infrastructurchanges in the Artifact-Module gnv-artifacts/trunk@79 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 14 Sep 2009 10:32:38 +0000
parents d117fd4b82e5
children 9b41f3688610
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Thu Sep 10 13:14:03 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Mon Sep 14 10:32:38 2009 +0000
@@ -7,6 +7,7 @@
 import java.awt.Dimension;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.util.Collection;
 import java.util.Iterator;
 
@@ -46,14 +47,13 @@
         return true;
     }
 
-    /**
-     * @see de.intevation.gnv.transition.OutputTransition#out(java.lang.String)
-     */
-    public byte[] out(String outputMode) throws TransitionException {
+   /**
+    * @see de.intevation.gnv.transition.OutputTransition#out(java.lang.String, java.io.OutputStream)
+    */
+    public void out(String outputMode, OutputStream outputStream) throws TransitionException {
         log.debug("TimeSeriesOutputTransition");
         try {
             this.advance(); // TODO nur neu holen wenn hash auf chartResult sich geändert hat
-            ByteArrayOutputStream os = new ByteArrayOutputStream();
             ChartFactory chartFactory = new ChartFactory();
             
             Collection<KeyValueDescibeData> parameters = this.getParameters();
@@ -66,8 +66,7 @@
             ChartLabels chartLables = new ChartLabels(lDiagramTitle.toString(),domainLable , /*mSelectedParams[0].getTitle()*/ "Selected Params Title");
             chartFactory.createSimpleTimeSeriesChart(chartLables, chartStyle, timeSeriesName, 
                                                      parameters, measurements, 
-                                                     os, this.chartResult);
-            return os.toByteArray();
+                                                     outputStream, this.chartResult);
         } catch (IOException e) {
             log.error(e,e);
             throw new TransitionException(e);

http://dive4elements.wald.intevation.org