|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.Util.zipIt
This utility class allows the Ganymede server to conveniently store a bunch of pre-existing files into a zip archive for the purposes of backups.
| Field Summary | |
(package private) static boolean |
debug
|
| Constructor Summary | |
zipIt()
|
|
| Method Summary | |
private static void |
addZipEntry(java.util.zip.ZipOutputStream zipOut,
java.io.File zipIn)
This method adds a new file to an existing ZipOutputStream. |
static void |
createZipFile(java.io.File outputFile,
java.util.Vector files)
This method creates a zip file, and adds a vector of Files to the zip file, without capturing any path information in the file names held in the zip file. |
static void |
createZipFile(java.lang.String outputFileName,
java.util.Vector fileNames)
This method creates a zip file, and adds a vector of Files to the zip file, without capturing any path information in the file names held in the zip file. |
static void |
main(java.lang.String[] args)
Test rig |
static boolean |
zipDirectory(java.lang.String directoryPath,
java.lang.String zipFileNames)
This method takes care of zipping up a directory of files into a zip file. |
static boolean |
zipDirectory(java.lang.String directoryPath,
java.lang.String zipFileName,
boolean includeZips)
This method takes care of zipping up a directory of files into a zip file. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final boolean debug
| Constructor Detail |
public zipIt()
| Method Detail |
public static boolean zipDirectory(java.lang.String directoryPath,
java.lang.String zipFileNames)
throws java.io.IOException
This method takes care of zipping up a directory of files into a zip file.
This method will not support subdirectories in the directory specified.. only flat files in the specific directoryPath will be zipped into zipFileName.
This method returns true if a zip file was successfully created, and false or an IOException if none could be. If there were no files in the given directory to zip, false will be returned.
public static boolean zipDirectory(java.lang.String directoryPath,
java.lang.String zipFileName,
boolean includeZips)
throws java.io.IOException
This method takes care of zipping up a directory of files into a zip file.
This method will not support subdirectories in the directory specified.. only flat files in the specific directoryPath will be zipped into zipFileName.
This method returns true if a zip file was successfully created, and false or an IOException if none could be. If there were no files in the given directory to zip, false will be returned.
public static void createZipFile(java.lang.String outputFileName,
java.util.Vector fileNames)
throws java.io.IOException
outputFile - Name of the zip file to be createdfiles - Vector of Strings naming files to be added to the
zip file.
public static void createZipFile(java.io.File outputFile,
java.util.Vector files)
throws java.io.IOException
outputFile - File object representing the zip file to be createdfiles - Vector of File objects representing the files to be added to the
zip file.
private static void addZipEntry(java.util.zip.ZipOutputStream zipOut,
java.io.File zipIn)
throws java.io.IOException
zipOut - ZipOutputStream to add zipIn to.zipIn - A File to be added to the ZipOutputStream.public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||