KickJava   Java API By Example, From Geeks To Geeks.

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


1 package prefuse.data.io;
2
3 import java.io.File JavaDoc;
4 import java.io.InputStream JavaDoc;
5 import java.net.URL JavaDoc;
6
7 import prefuse.data.Table;
8
9 /**
10  * Interface for classes that read in Table data from a particular file format.
11  *
12  * @author <a HREF="http://jheer.org">jeffrey heer</a>
13  */

14 public interface TableReader {
15
16     /**
17      * Read in a table from the file at the given location. Though
18      * not required by this interface, the String is typically resolved
19      * using the {@link prefuse.util.io.IOLib#streamFromString(String)} method,
20      * allowing URLs, classpath references, and files on the file system
21      * to be accessed.
22      * @param location the location to read the table from
23      * @return the loaded Table
24      * @throws DataIOException
25      * @see prefuse.util.io.IOLib#streamFromString(String)
26      */

27     public Table readTable(String JavaDoc location) throws DataIOException;
28     
29     /**
30      * Read in a table from the given URL.
31      * @param url the url to read the graph from
32      * @return the loaded Table
33      * @throws DataIOException
34      */

35     public Table readTable(URL JavaDoc url) throws DataIOException;
36     
37     /**
38      * Read in a table from the given File.
39      * @param f the file to read the table from
40      * @return the loaded Table
41      * @throws DataIOException
42      */

43     public Table readTable(File JavaDoc f) throws DataIOException;
44     
45     /**
46      * Read in a table from the given InputStream.
47      * @param is the InputStream to read the table from
48      * @return the loaded Table
49      * @throws DataIOException
50      */

51     public Table readTable(InputStream JavaDoc is) throws DataIOException;
52     
53 } // end of interface TableReader
54
Popular Tags