mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
fix comment
This commit is contained in:
parent
05c679bfc5
commit
1fbc6b61bd
@ -97,6 +97,7 @@ public class IoUtil extends NioUtil {
|
||||
* @param reader Reader
|
||||
* @param writer Writer
|
||||
* @param bufferSize 缓存大小
|
||||
* @param count 最大长度
|
||||
* @param streamProgress 进度处理器
|
||||
* @return 传输的byte数
|
||||
* @throws IORuntimeException IO异常
|
||||
|
@ -63,6 +63,7 @@ public class NioUtil {
|
||||
* @param in 输入流
|
||||
* @param out 输出流
|
||||
* @param bufferSize 缓存大小
|
||||
* @param count 最大长度
|
||||
* @param streamProgress 进度条
|
||||
* @return 传输的byte数
|
||||
* @throws IORuntimeException IO异常
|
||||
|
@ -28,9 +28,9 @@ public abstract class IoCopier<S, T> {
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param bufferSize 缓存大小,< 0 表示默认{@link IoUtil#DEFAULT_BUFFER_SIZE}
|
||||
* @param count 拷贝总数,-1表示无限制
|
||||
* @param progress 进度条
|
||||
* @param bufferSize 缓存大小,< 0 表示默认{@link IoUtil#DEFAULT_BUFFER_SIZE}
|
||||
* @param count 拷贝总数,-1表示无限制
|
||||
* @param progress 进度条
|
||||
*/
|
||||
public IoCopier(int bufferSize, long count, StreamProgress progress) {
|
||||
this.bufferSize = bufferSize > 0 ? bufferSize : IoUtil.DEFAULT_BUFFER_SIZE;
|
||||
@ -49,9 +49,11 @@ public abstract class IoCopier<S, T> {
|
||||
|
||||
/**
|
||||
* 缓存大小,取默认缓存和目标长度最小值
|
||||
*
|
||||
* @param count 目标长度
|
||||
* @return 缓存大小
|
||||
*/
|
||||
protected int bufferSize(long count) {
|
||||
return (int)Math.min(this.bufferSize, count);
|
||||
return (int) Math.min(this.bufferSize, count);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user