edu.kzoo.grid.gui
Interface GridDataFileHandler


public interface GridDataFileHandler

Grid GUI Support Package:
The GridDataFileHandler interface specifies methods for reading grid information from a file and writing it to a file.

Version:
15 December 2003
Author:
Alyce Brady

Method Summary
 Grid readGrid(java.io.File file)
          Reads information about a grid from an initial configuration data file and creates the grid.
 void writeGrid(Grid grid, java.io.File file)
          Writes information about a grid into a data file.
 

Method Detail

readGrid

public Grid readGrid(java.io.File file)
              throws java.io.FileNotFoundException
Reads information about a grid from an initial configuration data file and creates the grid.

Parameters:
file - java.io.File object from which to read
Returns:
the newly created grid
Throws:
java.io.FileNotFoundException - if file cannot be opened
java.lang.RuntimeException - if invalid information is read from file

writeGrid

public void writeGrid(Grid grid,
                      java.io.File file)
               throws java.io.IOException
Writes information about a grid into a data file.

Parameters:
grid - grid to write to file
file - java.io.File object to which to write
Throws:
java.io.IOException - if error writing to file