SourceJammer 1.1.0 March 1, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

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.


Field Summary
static int ZIP_BUFFER_SIZE
           
 
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
 

Field Detail

ZIP_BUFFER_SIZE

public static final int ZIP_BUFFER_SIZE
Method Detail

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.

SourceJammer 1.1.0 March 1, 2002
Copyright (c) 2001, 2002 Robert MacGrogan