]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.simulation/src/org/simantics/simulation/export/CSVWriter.java
Obey Indexing.isDependenciesIndexingDisabled
[simantics/platform.git] / bundles / org.simantics.simulation / src / org / simantics / simulation / export / CSVWriter.java
1 package org.simantics.simulation.export;
2
3 import java.io.BufferedOutputStream;
4 import java.io.File;
5 import java.io.FileOutputStream;
6 import java.io.IOException;
7 import java.io.PrintStream;
8
9 import org.simantics.history.HistoryException;
10 import org.simantics.history.csv.CSVFormatter;
11
12 public class CSVWriter extends CSVFormatter {
13         public File file;               
14         
15         public void write() throws IOException, HistoryException  {
16                 FileOutputStream fos = null;
17                 try {
18                 fos = new FileOutputStream(file, true);
19                 BufferedOutputStream bos = new BufferedOutputStream( fos );
20                 PrintStream ps = new PrintStream( bos );
21                 formulate2( null, ps );
22                 bos.flush();
23                 } finally {
24                         if ( fos != null ) {
25                                 try {
26                                         fos.close();
27                                 } catch (IOException e) {
28                                 }
29                         }
30                 }
31                 
32         }
33 }