public class Zipper
extends java.lang.Object
| Constructor and Description |
|---|
Zipper()
Creates a new instance of Zipper
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] inputData) |
byte[] |
expand(byte[] compressedData)
expand a compressed data byte array to it's original form.
|
int |
getCompressedFileSizes(java.io.File file)
Returns the total compressed size of all files in the zip file
|
int |
getFileCount(java.io.File file)
Returns the number of files in a zip file
|
int |
getUncompressedFileSizes(java.io.File file)
Returns the total uncompressed size of all files in the zip file
|
static boolean |
isZip(java.io.File file)
Checks if a file is a zip file or not
|
public static boolean isZip(java.io.File file)
file - is the file to checkpublic int getFileCount(java.io.File file)
file - is the file to checkpublic int getCompressedFileSizes(java.io.File file)
file - is the file to checkpublic int getUncompressedFileSizes(java.io.File file)
file - is the file to checkpublic byte[] compress(byte[] inputData)
throws java.io.IOException
java.io.IOExceptionpublic byte[] expand(byte[] compressedData)
throws java.util.zip.DataFormatException,
java.io.IOException
compressedData - is the compressedData to expandjava.util.zip.DataFormatException - IOExceptionjava.io.IOException