org.sourcejammer.util
Class ZipUtil
java.lang.Object
|
+--org.sourcejammer.util.ZipUtil
- public class ZipUtil
- extends java.lang.Object
Static utility methods for zipping data.
Method Summary |
static boolean |
canZip(java.lang.String fileName)
Checks passed-in file name against list of extensions not to zip. |
static byte[] |
unzipByteArray(byte[] file)
Inflates a previously deflated file. |
static byte[] |
zipByteArray(byte[] file)
Deflates the file and returns the deflated file. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ZIP_BUFFER_SIZE
public static final int ZIP_BUFFER_SIZE
zipByteArray
public static byte[] zipByteArray(byte[] file)
throws java.io.IOException
- Deflates the file and returns the deflated file.
unzipByteArray
public static byte[] unzipByteArray(byte[] file)
throws java.io.IOException
- Inflates a previously deflated file.
canZip
public static boolean canZip(java.lang.String fileName)
- Checks passed-in file name against list of extensions not to zip. Returns
true if no matches, false if a match to file extension is found.