java.io.IOException: Zip bomb detected! The file would exceed the max.

前端之家收集整理的这篇文章主要介绍了java.io.IOException: Zip bomb detected! The file would exceed the max.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

解决办法:

添加一行代码即可

ZipSecureFile.setMinInflateRatio(-1.0d);

 

参考:

FileInputStream file = new FileInputStream("D:\\newData.xlsx");
ZipSecureFile.setMinInflateRatio(-1.0d);
XSSFWorkbook wb = new XSSFWorkbook(file);

 

猜你在找的Java相关文章