1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| import net.lingala.zip4j.ZipFile; import net.lingala.zip4j.exception.ZipException;
public class Decompression { /** * 解压 * @param zipFilePath 待解压文件的路径 * @param unzipFilePath 解压后的文件存储路径 * @throws Exception */ public static void unzip(String zipFilePath, String unzipFilePath){ try{ new ZipFile(zipFilePath).extractAll(unzipFilePath); }catch (ZipException e){ e.printStackTrace(); }
}
}
|