Package weka.experiment
Class OutputZipper
java.lang.Object
weka.experiment.OutputZipper
- All Implemented Interfaces:
RevisionHandler
OutputZipper writes output to either gzipped files or to a
multi entry zip file. If the destination file is a directory
each output string will be written to an individually named
gzip file. If the destination file is a file, then each
output string is appended as a named entry to the zip file until
finished() is called to close the file.
- Version:
- $Revision: 8034 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinished()Closes the zip file.Returns the revision string.static voidMain method for testing this classvoidSaves a string to either an individual gzipped file or as an entry in a zip file.
-
Constructor Details
-
OutputZipper
Constructor.- Parameters:
destination- a destination file or directory- Throws:
Exception- if something goes wrong.
-
-
Method Details
-
zipit
Saves a string to either an individual gzipped file or as an entry in a zip file.- Parameters:
outString- the output string to savename- the name of the file/entry to save it to- Throws:
Exception- if something goes wrong
-
finished
Closes the zip file.- Throws:
Exception- if something goes wrong
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
main
Main method for testing this class
-