mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix #I2B0S1
This commit is contained in:
@@ -2914,7 +2914,20 @@ public class FileUtil extends PathUtil {
|
||||
* @throws IORuntimeException IO异常
|
||||
*/
|
||||
public static File writeFromStream(InputStream in, File dest) throws IORuntimeException {
|
||||
return FileWriter.create(dest).writeFromStream(in);
|
||||
return writeFromStream(in, dest, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将流的内容写入文件
|
||||
*
|
||||
* @param dest 目标文件
|
||||
* @param in 输入流
|
||||
* @return dest
|
||||
* @throws IORuntimeException IO异常
|
||||
* @since 5.5.6
|
||||
*/
|
||||
public static File writeFromStream(InputStream in, File dest, boolean isCloseIn) throws IORuntimeException {
|
||||
return FileWriter.create(dest).writeFromStream(in, isCloseIn);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -644,7 +644,7 @@ public class ZipUtil {
|
||||
outItemFile.mkdirs();
|
||||
} else {
|
||||
// 文件
|
||||
FileUtil.writeFromStream(zipStream, outItemFile);
|
||||
FileUtil.writeFromStream(zipStream, outItemFile, false);
|
||||
}
|
||||
});
|
||||
return outFile;
|
||||
|
Reference in New Issue
Block a user