|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object base.util.ZipUtil
public class ZipUtil
This class provides some basic methods to compress/uncompress files and folders in zip compression format.
Constructor Summary | |
---|---|
ZipUtil()
|
Method Summary | |
---|---|
static void |
unZipFile(java.io.File inputFile,
java.io.File outputDirectory)
This method provides a simple unzip facility for a composite zip file (a zip file that contains files and folders). |
static void |
zipAllFile(java.io.File[] inputFile,
java.io.File outputFile)
|
static void |
zipAllFile(java.io.File[] inputFile,
java.util.zip.ZipOutputStream zipOutputStream)
|
static void |
zipDirectory(java.io.File inputFile,
java.io.File outputFile)
This method is a wrapper for the method the zipDirectory(File, ZipOutputStream). |
static void |
zipDirectory(java.io.File inputFile,
java.util.zip.ZipOutputStream zipOutputStream)
This method provides a simple zip compression for a file or an entire folder. |
static void |
zipFile(java.io.File inputFile,
java.io.File outputFile)
This method is a wrapper for the method the zipFile(File, ZipOutputStream). |
static void |
zipFile(java.io.File inputFile,
java.util.zip.ZipOutputStream zipOutputStream)
This method provides a simple zip compression for a file (not a folder). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZipUtil()
Method Detail |
---|
public static void zipDirectory(java.io.File inputFile, java.io.File outputFile) throws java.io.IOException
inputFile
- The input file/folder to be zipped.outputFile
- The zipped outputted file.
java.io.IOException
- If something wrong happpens.public static void zipDirectory(java.io.File inputFile, java.util.zip.ZipOutputStream zipOutputStream) throws java.io.IOException
inputFile
- The input file/folder whose content must be zipped.zipOutputStream
- The target output stream that points to the location where the
zip file must be placed.
java.io.IOException
- If something wrong happens.public static void zipAllFile(java.io.File[] inputFile, java.io.File outputFile) throws java.io.IOException
java.io.IOException
public static void zipAllFile(java.io.File[] inputFile, java.util.zip.ZipOutputStream zipOutputStream) throws java.io.IOException
java.io.IOException
public static void zipFile(java.io.File inputFile, java.io.File outputFile) throws java.io.IOException
inputFile
- The input file (not a folder) to be zipped.outputFile
- The zipped outputted file.
java.io.IOException
- If something wrong happpens.public static void zipFile(java.io.File inputFile, java.util.zip.ZipOutputStream zipOutputStream) throws java.io.IOException
inputFile
- The file that must be zippede.zipOutputStream
- The target output stream that points to the location where the
zip file must be placed.
java.io.IOException
- If something wrong happens.public static void unZipFile(java.io.File inputFile, java.io.File outputDirectory) throws java.io.IOException
inputFile
- The zip file that must be extracted.outputDirectory
- The destination folder where the content of the input zipped
file must be placed.
java.io.IOException
- If something wrong happens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |