jcreek.cke.document
Interface CreekFormat

All Known Implementing Classes:
SerializeFormat

public interface CreekFormat

Defines the interface for classes that wish to act as a file format for the JavaCreek program. By implementing this interface, a class can support a new file format, allowing JavaCreek to read and write in that format.

Because the read/write methods use generic input/output streams the caller can read or write to anything, not just files on disk.

Version:
Author:

Method Summary
 boolean read(java.io.FileInputStream is, Graph grp, java.lang.StringBuffer title)
          Read the given input file and fill in the given Graph.
 boolean write(java.io.FileOutputStream os, Graph graph, java.lang.String title)
          Writes the graph to the given output stream.
 

Method Detail

read

public boolean read(java.io.FileInputStream is,
                    Graph grp,
                    java.lang.StringBuffer title)
Read the given input file and fill in the given Graph. If the read failed at any point then false is returned.

Parameters:
is - input stream to read from
Returns:
true if successful, false otherwise

write

public boolean write(java.io.FileOutputStream os,
                     Graph graph,
                     java.lang.String title)
Writes the graph to the given output stream. If the read failed at any point then false is returned.

Parameters:
os - output stream to write to
Returns:
true if successful, false if error


Created at IDI, NTNU by the Artificial Intelligence and Learning group