psdi.util

Class ZipUtil

  • java.lang.Object
    • psdi.util.ZipUtil


  • public class ZipUtil
    extends java.lang.Object
    This utility compresses a list of files to standard ZIP format file. It is able to compress all sub files and sub directories, recursively.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ZipUtil() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] zip(java.io.File dir)
      Compresses a list of files to a destination zip file
      byte[] zip(java.io.File dir, java.util.Date start) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZipUtil

        public ZipUtil()
    • Method Detail

      • zip

        public byte[] zip(java.io.File dir)
                   throws java.io.IOException
        Compresses a list of files to a destination zip file
        Parameters:
        listFiles - A collection of files and directories
        destZipFile - The path of the destination zip file
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • zip

        public byte[] zip(java.io.File dir,
                          java.util.Date start)
                   throws java.io.IOException
        Throws:
        java.io.IOException