类 Test

java.lang.Object
com.sh.common.zip.Test

public class Test extends Object
Description: 测试 Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
  • 构造器详细资料

    • Test

      public Test()
  • 方法详细资料

    • setComment

      public void setComment(String comment)
    • zip

      public void zip(String src, String dest, List filter) throws Exception
      参数:
      src - :要压缩的目录
      dest - :压缩文件存档
      filter - List
      抛出:
      Exception - Exception
    • zip

      public void zip(ZipOutputStream out, File srcFile, String base, List filter) throws Exception
      参数:
      out - ZipOutputStream
      srcFile - File
      base - :根路径
      filter - :过滤
      抛出:
      Exception - Exception
    • isExist

      public boolean isExist(String base, List list)
      过滤出要压缩的文件夹
      参数:
      base - String
      list - List
      返回:
      boolean
    • unZip

      public void unZip(String srcFile, String dest, boolean deleteFile) throws Exception
      参数:
      srcFile - :压缩文件路径
      dest - :解压到的目录
      deleteFile - :解压完成后是否删除文件
      抛出:
      Exception - Exception
    • getZipComment

      public static String getZipComment(String srcFile)
      获取Zip文件的注释信息
      参数:
      srcFile - String
      返回:
      String
    • main

      public static void main(String[] args) throws Exception
      抛出:
      Exception