程序包 com.mbap.ct.util

类 DownloadUtil

java.lang.Object
com.mbap.ct.util.DownloadUtil

public class DownloadUtil extends Object
  • 构造器详细资料

    • DownloadUtil

      public DownloadUtil()
  • 方法详细资料

    • zipFile

      public static void zipFile(File fileToZip, String fileName, ZipOutputStream zipOut) throws IOException
      压缩文件
      参数:
      fileToZip - 待压缩的目录
      fileName - 文件名
      zipOut - 输出位置
      抛出:
      IOException
    • download

      public static void download(String path, String uuid, javax.servlet.http.HttpServletResponse response)
    • delete

      public static boolean delete(File dir)
      递归删除目录下的所有文件及子目录下所有文件
      参数:
      dir - 将要删除的文件目录
      返回:
      boolean Returns "true" if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns "false".