Package com.axemble.vdoc.sdk.utils
Class ZipUtils
java.lang.Object
com.axemble.vdoc.sdk.utils.ZipUtils
A collection of methods to deal with ZIP API.
- Since:
- 1.0, 08/01/2009
- Author:
- vlygeros
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanunzipFile(File file, ZipUtils.ZipListener listener) Allows to uncompress a file using a listener.static booleanunzipFile(InputStream inputStream, ZipUtils.ZipListener listener) Allows to uncompress a InputStream using a listener.static booleanzipDirectory(File directory, OutputStream outputStream) Allows to compress all the files within a specified directory.static booleanzipFile(File file, OutputStream outputStream) Allows to compress a single file.static booleanzipFiles(Collection files, OutputStream outputStream) Allows to compress files and directories.
- 
Constructor Details- 
ZipUtilspublic ZipUtils()
 
- 
- 
Method Details- 
zipDirectoryAllows to compress all the files within a specified directory.- Parameters:
- directory- The directory to compress.
- outputStream- The OutputStream object.
- Returns:
- true if succeed, false otherwise.
- Throws:
- IOException- Any IOException.
 
- 
zipFileAllows to compress a single file.- Parameters:
- file- The file to compress.
- outputStream- The OutputStream object.
- Returns:
- true if succeed, false otherwise.
- Throws:
- IOException- Any IOException.
 
- 
zipFilesAllows to compress files and directories.- Parameters:
- files- The list of the files to compress.
- outputStream- The OutputStream object.
- Returns:
- true if succeed, false otherwise.
- Throws:
- IOException- Any IOException.
 
- 
unzipFilepublic static boolean unzipFile(InputStream inputStream, ZipUtils.ZipListener listener) throws IOException Allows to uncompress a InputStream using a listener.- Parameters:
- inputStream- The InputStream to uncompress.
- listener- The- ZipUtils.ZipListenerobject.
- Returns:
- true if succeed, false otherwise.
- Throws:
- IOException- Any IOException.
 
- 
unzipFileAllows to uncompress a file using a listener.- Parameters:
- file- The file to unzip.
- listener- The- ZipUtils.ZipListenerobject.
- Returns:
- true if succeed, false otherwise.
- Throws:
- IOException- Any IOException.
 
 
-