graphreader.java
来自「用applet实现很多应用小程序」· Java 代码 · 共 58 行
JAVA
58 行
package prefuse.data.io;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import prefuse.data.Graph;
/**
* nterface for classes that read in Graph or Tree data from a particular
* file format.
*
* @author <a href="http://jheer.org">jeffrey heer</a>
*/
public interface GraphReader {
/**
* Read in a graph from the file at the given location. Though
* not required by this interface, the String is typically resolved
* using the {@link prefuse.util.io.IOLib#streamFromString(String)} method,
* allowing URLs, classpath references, and files on the file system
* to be accessed.
* @param location the location to read the table from
* @return the loaded Graph
* @throws FileNotFoundException
* @throws IOException
*/
public Graph readGraph(String location) throws DataIOException;
/**
* Read in a graph from the given URL.
* @param url the url to read the graph from
* @return the loaded Graph
* @throws IOException
*/
public Graph readGraph(URL url) throws DataIOException;
/**
* Read in a graph from the given File.
* @param f the file to read the graph from
* @return the loaded Graph
* @throws FileNotFoundException
* @throws IOException
*/
public Graph readGraph(File f) throws DataIOException;
/**
* Read in a graph from the given InputStream.
* @param is the InputStream to read the graph from
* @return the loaded Graph
* @throws IOException
*/
public Graph readGraph(InputStream is) throws DataIOException;
} // end of interface GraphReader
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?