|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.graph.core.GraphFileFormat
This abstract class defines a simple streaming format for Graphs
.
The file format can save an array of Graphs
(that may be
sticked together) and may be used as part of another streaming format.
Field Summary | |
static java.lang.String |
FILE_ID
The id for the file format. |
static byte |
VERSION
The actial version number. |
Constructor Summary | |
GraphFileFormat()
|
Method Summary | |
static Graph |
readGraph(java.io.InputStream istream)
Reads a single Graph from the given InputStream . |
static Graph |
readGraph(java.lang.String filename)
Reads a single Graph from the specified file. |
static Graph[] |
readGraphs(java.io.InputStream istream)
Reads an array of Graphs from the given InputStream . |
static Graph[] |
readGraphs(java.lang.String filename)
Reads an array of Graphs from the specified file. |
static void |
writeGraph(Graph graph,
java.io.OutputStream ostream)
Writes a single Graph to a given OutputStream . |
static void |
writeGraph(Graph graph,
java.lang.String filename)
Writes a single Graph to the specified file. |
static void |
writeGraphs(Graph[] graphs,
java.io.OutputStream ostream)
Writes an array of Graphs to a given OutputStream . |
static void |
writeGraphs(Graph[] graphs,
java.lang.String filename)
Writes an array of Graphs to the specified file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FILE_ID
public static final byte VERSION
Constructor Detail |
public GraphFileFormat()
Method Detail |
public static void writeGraphs(Graph[] graphs, java.io.OutputStream ostream) throws java.io.IOException
Graphs
to a given OutputStream
.graphs
- array of Graphs
to writeostream
- the OutputStream
to use for writingjava.io.IOException
- public static void writeGraph(Graph graph, java.io.OutputStream ostream) throws java.io.IOException
Graph
to a given OutputStream
.graph
- the Graph
to writeostream
- the OutputStream
to use for writingjava.io.IOException
- public static void writeGraphs(Graph[] graphs, java.lang.String filename)
Graphs
to the specified file.graphs
- array of Graphs
to writefilname
- specifies the file to write the Graphs
tojava.io.IOException
- public static void writeGraph(Graph graph, java.lang.String filename)
Graph
to the specified file.graph
- the Graph
to writefilname
- specifies the file to write the Graph
tojava.io.IOException
- public static Graph[] readGraphs(java.io.InputStream istream) throws java.io.IOException, java.lang.ClassNotFoundException
Graphs
from the given InputStream
.istream
- the InputStream
to useGraphs
public static Graph readGraph(java.io.InputStream istream) throws java.io.IOException, java.lang.ClassNotFoundException
Graph
from the given InputStream
.istream
- the InputStream
to useGraph
public static Graph[] readGraphs(java.lang.String filename)
Graphs
from the specified file.filname
- specifies the file to read the Graphs
fromGraphs
public static Graph readGraph(java.lang.String filename)
Graph
from the specified file.filname
- specifies the file to read the Graph
fromGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |