!594 StreamProgress进度条添加总大小值回调

Merge pull request !594 from 追风/v5-dev
This commit is contained in:
Looly
2022-04-10 07:29:19 +00:00
committed by Gitee
5 changed files with 27 additions and 27 deletions

View File

@@ -17,7 +17,7 @@ public interface StreamProgress {
*
* @param progressSize 已经进行的大小
*/
void progress(long progressSize);
void progress(long contentLength, long progressSize);
/**
* 结束

View File

@@ -107,7 +107,7 @@ public class ChannelCopier extends IoCopier<ReadableByteChannel, WritableByteCha
numToRead -= read;
total += read;
if (null != progress) {
progress.progress(total);
progress.progress(this.count, total);
}
}

View File

@@ -108,7 +108,7 @@ public class ReaderWriterCopier extends IoCopier<Reader, Writer> {
numToRead -= read;
total += read;
if (null != progress) {
progress.progress(total);
progress.progress(this.count, total);
}
}

View File

@@ -107,7 +107,7 @@ public class StreamCopier extends IoCopier<InputStream, OutputStream> {
numToRead -= read;
total += read;
if (null != progress) {
progress.progress(total);
progress.progress(this.count, total);
}
}