KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > prefuse > data > io > AbstractTableWriter


1 package prefuse.data.io;
2
3 import java.io.File JavaDoc;
4 import java.io.FileNotFoundException JavaDoc;
5 import java.io.FileOutputStream JavaDoc;
6
7 import prefuse.data.Table;
8
9 /**
10  * Abstract base class implementation of the TableWriter interface. Provides
11  * implementations for all but the
12  * {@link prefuse.data.io.TableWriter#writeTable(Table, java.io.OutputStream)}
13  * method.
14  *
15  * @author <a HREF="http://jheer.org">jeffrey heer</a>
16  */

17 public abstract class AbstractTableWriter implements TableWriter {
18
19     /**
20      * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.lang.String)
21      */

22     public void writeTable(Table table, String JavaDoc filename) throws DataIOException
23     {
24         writeTable(table, new File JavaDoc(filename));
25     }
26
27     /**
28      * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.io.File)
29      */

30     public void writeTable(Table table, File JavaDoc f) throws DataIOException {
31         try {
32             writeTable(table, new FileOutputStream JavaDoc(f));
33         } catch ( FileNotFoundException JavaDoc e ) {
34             throw new DataIOException(e);
35         }
36     }
37
38 } // end of abstract class AbstractTableReader
39
Popular Tags