1 package prefuse.data.io; 2 3 import java.io.File ; 4 import java.io.FileNotFoundException ; 5 import java.io.FileOutputStream ; 6 7 import prefuse.data.Graph; 8 9 17 public abstract class AbstractGraphWriter implements GraphWriter { 18 19 22 public void writeGraph(Graph graph, String filename) throws DataIOException 23 { 24 writeGraph(graph, new File (filename)); 25 } 26 27 30 public void writeGraph(Graph graph, File f) throws DataIOException { 31 try { 32 writeGraph(graph, new FileOutputStream (f)); 33 } catch ( FileNotFoundException e ) { 34 throw new DataIOException(e); 35 } 36 } 37 38 } | Popular Tags |