All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tw.edu.ncnu.im.cnclab.JGAP.GraphIO

java.lang.Object
   |
   +----tw.edu.ncnu.im.cnclab.JGAP.GraphIO

public class GraphIO
extends Object
The GraphIO class implements the I/O Method of a graph.

Version:
0.4 Jul 8, 1999
Author:
Ding-Yi Chen
See Also:
Graph

Method Index

 o load(String)
Load graph from file.
 o save(String, Graph)
Save graph to file.

Methods

 o load
 public static synchronized Graph load(String filename) throws IOException, ClassNotFoundException
Load graph from file.

Parameters:
filename - The file to load.
Returns:
the graph loaded.
Throws: IOException
An exception occurred in the underlying stream.
Throws: ClassNotFoundException
Class of a serialized object cannot be found.
 o save
 public static synchronized void save(String filename,
                                      Graph graph) throws IOException
Save graph to file.

Parameters:
filename - The file to save.
graph - The graph to save.
Throws: IOException
An exception occurred in the underlying stream.

All Packages  Class Hierarchy  This Package  Previous  Next  Index