abstracttablewriter.java

来自「用applet实现很多应用小程序」· Java 代码 · 共 39 行

JAVA
39
字号
package prefuse.data.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import prefuse.data.Table;

/**
 * Abstract base class implementation of the TableWriter interface. Provides
 * implementations for all but the
 * {@link prefuse.data.io.TableWriter#writeTable(Table, java.io.OutputStream)}
 * method.
 *  
 * @author <a href="http://jheer.org">jeffrey heer</a>
 */
public abstract class AbstractTableWriter implements TableWriter {

    /**
     * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.lang.String)
     */
    public void writeTable(Table table, String filename) throws DataIOException
    {
        writeTable(table, new File(filename));
    }

    /**
     * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.io.File)
     */
    public void writeTable(Table table, File f) throws DataIOException {
        try {
            writeTable(table, new FileOutputStream(f));
        } catch ( FileNotFoundException e ) {
            throw new DataIOException(e);
        }
    }

} // end of abstract class AbstractTableReader

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?