|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphFileType
Classes implementing this interface provide support for a certain file type for storing graphs. Each class should implement methods to store the graph in a file, load a graph from the file, and tell if it accepts the given file.
GraphRWException
Method Summary | |
---|---|
boolean |
accepts(java.io.File file)
Retrieves if the file is readable by this graph reader. |
java.lang.String |
getExtension()
Retrieves the file extension for the file type. |
java.lang.String |
getName()
Retrieves the name of the file type. |
void |
read(java.io.File file,
Graph graph)
The method should Read the file and enter the data in the graph. |
void |
write(java.io.File file,
GraphData data)
The method should write the graph data into the file. |
Method Detail |
---|
void read(java.io.File file, Graph graph) throws GraphRWException, java.io.IOException
file
- The file.graph
- The graph.
GraphRWException
- In the case of the reader error.
java.io.IOException
- In the case of the IO error.void write(java.io.File file, GraphData data) throws GraphRWException, java.io.IOException
file
- The file.data
- The data about the graph.
GraphRWException
- In the case of the writer error.
java.io.IOException
- In the case of the IO error.boolean accepts(java.io.File file)
file
- The file.
java.lang.String getName()
java.lang.String getExtension()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |