-package org.simantics.simulation.export;\r
-\r
-import java.io.BufferedOutputStream;\r
-import java.io.File;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.PrintStream;\r
-\r
-import org.simantics.history.HistoryException;\r
-import org.simantics.history.csv.CSVFormatter;\r
-\r
-public class CSVWriter extends CSVFormatter {\r
- public File file; \r
- \r
- public void write() throws IOException, HistoryException {\r
- FileOutputStream fos = null;\r
- try {\r
- fos = new FileOutputStream(file, true);\r
- BufferedOutputStream bos = new BufferedOutputStream( fos );\r
- PrintStream ps = new PrintStream( bos );\r
- formulate2( null, ps );\r
- bos.flush();\r
- } finally {\r
- if ( fos != null ) {\r
- try {\r
- fos.close();\r
- } catch (IOException e) {\r
- }\r
- }\r
- }\r
- \r
- }\r
-}\r
+package org.simantics.simulation.export;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.simantics.history.HistoryException;
+import org.simantics.history.csv.CSVFormatter;
+
+public class CSVWriter extends CSVFormatter {
+ public File file;
+
+ public void write() throws IOException, HistoryException {
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(file, true);
+ BufferedOutputStream bos = new BufferedOutputStream( fos );
+ PrintStream ps = new PrintStream( bos );
+ formulate2( null, ps );
+ bos.flush();
+ } finally {
+ if ( fos != null ) {
+ try {
+ fos.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ }
+}