mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
修复IoUtil.copyByNIO方法写出时没有flush的问题
This commit is contained in:
parent
2bafc6c8a8
commit
7b23328d3f
@ -3,7 +3,7 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.8.10.M1 (2022-10-24)
|
||||
# 5.8.10.M1 (2022-10-27)
|
||||
|
||||
### 🐣新特性
|
||||
* 【http 】 HttpResponse增加getFileNameFromDisposition方法(pr#2676@Github)
|
||||
@ -13,6 +13,7 @@
|
||||
* 【db 】 修复分页时order by截断问题(issue#I5X6FM@Gitee)
|
||||
* 【core 】 修复Partition计算size除数为0报错问题(pr#2677@Github)
|
||||
* 【core 】 由于对于ASCII的编码解码有缺陷,且这种BCD实现并不规范,因此BCD标记为弃用(issue#I5XEC6@Gitee)
|
||||
* 【core 】 修复IoUtil.copyByNIO方法写出时没有flush的问题
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.9 (2022-10-22)
|
||||
|
@ -70,7 +70,9 @@ public class NioUtil {
|
||||
* @since 5.7.8
|
||||
*/
|
||||
public static long copyByNIO(InputStream in, OutputStream out, int bufferSize, long count, StreamProgress streamProgress) throws IORuntimeException {
|
||||
return copy(Channels.newChannel(in), Channels.newChannel(out), bufferSize, count, streamProgress);
|
||||
final long copySize = copy(Channels.newChannel(in), Channels.newChannel(out), bufferSize, count, streamProgress);
|
||||
IoUtil.flush(out);
|
||||
return copySize;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user