KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * Copyright (c) 2004-2006 Regents of the University of California.
3  * See "license-prefuse.txt" for licensing terms.
4  */

5 package prefuse.data.io;
6
7 import java.io.File JavaDoc;
8 import java.io.OutputStream JavaDoc;
9
10 import prefuse.data.Graph;
11
12 /**
13  * Interface for classes that write Graph data to a particular file format.
14  *
15  * @author <a HREF="http://jheer.org">jeffrey heer</a>
16  */

17 public interface GraphWriter {
18
19     /**
20      * Write a graph to the file with the given filename.
21      * @param graph the Graph to write
22      * @param filename the file to write the graph to
23      * @throws DataWriteException
24      */

25     public void writeGraph(Graph graph, String JavaDoc filename) throws DataIOException;
26     
27     /**
28      * Write a graph to the given File.
29      * @param graph the Graph to write
30      * @param f the file to write the graph to
31      * @throws DataWriteException
32      */

33     public void writeGraph(Graph graph, File JavaDoc f) throws DataIOException;
34     
35     /**
36      * Write a graph from the given OutputStream.
37      * @param graph the Graph to write
38      * @param os the OutputStream to write the graph to
39      * @throws DataWriteException
40      */

41     public void writeGraph(Graph graph, OutputStream JavaDoc os) throws DataIOException;
42     
43 } // end of interface GraphWriter
44
Popular Tags