欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  Java

Java实现zip解压缩目录中的所有文件

程序员文章站 2022-03-20 08:21:17
...
import java.io.*;
import java.util.*;
import java.util.zip.*;
public class FolderUnzip {
private static String sourcepath="D:\\tmp";
private static ListfolderList=new ArrayList(Arrays.asList(sourcepath));
private static ListfolderList2=new ArrayList(Arrays.asList("E:\\tt"+File.separator+sourcepath.substring(sourcepath.lastIndexOf(File.separator))));
private static FileInputStream fis = null;
private static FileOutputStream fos = null;
private static ZipInputStream zipin = null;
    public static void main(String[] args) {
        for (int j = 0; j