Package com.gooddata.sdk.service.util
Class ZipHelper
java.lang.Object
com.gooddata.sdk.service.util.ZipHelper
Utility class for manipulating zip archives.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidzip(File file, OutputStream output) This method compresses the input file to zip format.static voidzip(File file, OutputStream output, boolean includeRoot) This method compresses the input file to zip format.
-
Constructor Details
-
ZipHelper
public ZipHelper()
-
-
Method Details
-
zip
This method compresses the input file to zip format. If the given file is a directory, it recursively packs the directory into the output. Not including given directory itself. If the given file is already zipped, simply copies it into the output.- Parameters:
file- file to be zippedoutput- stream where the output will be written- Throws:
IOException- if zip creation fails
-
zip
This method compresses the input file to zip format. If the given file is a directory, it recursively packs the directory into the output. If the given file is already zipped, simply copies it into the output.- Parameters:
file- file to be zippedoutput- stream where the output will be writtenincludeRoot- if root dir should be included- Throws:
IOException- if zip creation fails
-