Package org.codehaus.cargo.util
Class ZipCompressor
- java.lang.Object
-
- org.codehaus.cargo.util.ZipCompressor
-
public class ZipCompressor extends Object
Utility for compressing ZIP files.
-
-
Constructor Summary
Constructors Constructor Description ZipCompressor(FileHandler fileHandler)
Saves the file handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compress(String sourceDirectory, String targetFile)
Compress a directory into a ZIP file.
-
-
-
Constructor Detail
-
ZipCompressor
public ZipCompressor(FileHandler fileHandler)
Saves the file handler.- Parameters:
fileHandler
- File handler.
-
-
Method Detail
-
compress
public void compress(String sourceDirectory, String targetFile) throws IOException
Compress a directory into a ZIP file.- Parameters:
sourceDirectory
- Source directory.targetFile
- Target ZIP file.- Throws:
IOException
- If any I/O exception occurs.
-
-