edu.washington.NVisF.animator
Class MovieIO

java.lang.Object
  |
  +--edu.washington.NVisF.animator.MovieIO
Direct Known Subclasses:
CompressedMovieIO, SimpleMovieIO

public abstract class MovieIO
extends java.lang.Object

A MovieIO object defines methods for writing a movie (consisting of an array of ObjectGroup objects) to file and reading such a pre-written movie. Different implementing classes support different file formats.


Constructor Summary
MovieIO()
           
 
Method Summary
 ObjectGroup[] readMovie(java.lang.String inputFileName)
          Reads a set of ObjectGroups from file.
 boolean writeMovie(ObjectGroup[] frames, java.lang.String outputFileName)
          Writes the supplied ObjectGroups to file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MovieIO

public MovieIO()
Method Detail

writeMovie

public boolean writeMovie(ObjectGroup[] frames,
                          java.lang.String outputFileName)
                   throws java.io.IOException
Writes the supplied ObjectGroups to file. The supplied file name is used as a pattern to construct the actual file name, according to the standards of the implementing class. Most classes will append an extension identifying the file format.
Parameters:
frames - the array of ObjectGroups to write
outputFileName - a String identifying the file to write to
Returns:
boolean true if the write succeeded, false otherwise
Throws:
java.io.IOException - if a write error occurs
java.lang.IllegalArgumentException - if something is wrong with the supplied ObjectGroups

readMovie

public ObjectGroup[] readMovie(java.lang.String inputFileName)
                        throws java.io.IOException
Reads a set of ObjectGroups from file. The supplied file name is used as a pattern to construct the actual file name, according to the standards of the implmenting class. Most classes will append an extension identifying the file format.
Parameters:
inputFileName - a String identifying the file to read from
Returns:
ObjectGroup[] the frames read from file, or null if something went wrong
Throws:
java.io.IOException - if a read error occurs
java.lang.IllegalArgumentException - if the data is somehow corrupted