mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复IoUtil.copyByNIO方法写出时没有flush的问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user