mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix code
This commit is contained in:
@@ -156,6 +156,7 @@ public class ZipUtilTest {
|
||||
//https://github.com/dromara/hutool/issues/944
|
||||
String dir = "d:/test";
|
||||
String zip = "d:/test.zip";
|
||||
//noinspection IOStreamConstructor
|
||||
try (OutputStream out = new FileOutputStream(zip)){
|
||||
//实际应用中, out 为 HttpServletResponse.getOutputStream
|
||||
ZipUtil.zip(out, Charset.defaultCharset(), false, null, new File(dir));
|
||||
@@ -200,9 +201,10 @@ public class ZipUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void SizeUnzip() throws IOException {
|
||||
String zipPath = "F:\\BaiduNetdiskDownload\\demo.zip";
|
||||
String outPath = "F:\\BaiduNetdiskDownload\\test";
|
||||
@Ignore
|
||||
public void sizeUnzipTest() throws IOException {
|
||||
String zipPath = "e:\\hutool\\demo.zip";
|
||||
String outPath = "e:\\hutool\\test";
|
||||
ZipFile zipFile = new ZipFile(zipPath, Charset.forName("GBK"));
|
||||
File file = new File(outPath);
|
||||
// 限制解压文件大小为637KB
|
||||
|
Reference in New Issue
Block a user