mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
e4f713a162
commit
477657ffb8
@ -6,6 +6,7 @@
|
|||||||
# 5.8.0.M3 (2022-04-10)
|
# 5.8.0.M3 (2022-04-10)
|
||||||
|
|
||||||
### ❌不兼容特性
|
### ❌不兼容特性
|
||||||
|
* 【core 】 StreamProgress#progress方法参数变更为2个(pr#594@Gitee)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【core 】 CopyOptions支持以Lambda方式设置忽略属性列表(pr#590@Gitee)
|
* 【core 】 CopyOptions支持以Lambda方式设置忽略属性列表(pr#590@Gitee)
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package cn.hutool.core.io;
|
package cn.hutool.core.io;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream进度条
|
* Stream进度条<br>
|
||||||
|
* 提供流拷贝进度监测,如开始、结束触发,以及进度回调。<br>
|
||||||
|
* 注意进度回调的{@code total}参数为总大小,某些场景下无总大小的标记,则此值应为-1或者{@link Long#MAX_VALUE},表示此参数无效。
|
||||||
*
|
*
|
||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
@ -15,9 +17,10 @@ public interface StreamProgress {
|
|||||||
/**
|
/**
|
||||||
* 进行中
|
* 进行中
|
||||||
*
|
*
|
||||||
|
* @param total 总大小,如果未知为 -1或者{@link Long#MAX_VALUE}
|
||||||
* @param progressSize 已经进行的大小
|
* @param progressSize 已经进行的大小
|
||||||
*/
|
*/
|
||||||
void progress(long contentLength, long progressSize);
|
void progress(long total, long progressSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束
|
* 结束
|
||||||
|
@ -44,7 +44,7 @@ public class DownloadTest {
|
|||||||
@Ignore
|
@Ignore
|
||||||
public void downloadTest() {
|
public void downloadTest() {
|
||||||
// 带进度显示的文件下载
|
// 带进度显示的文件下载
|
||||||
HttpUtil.downloadFile("http://mirrors.sohu.com/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso", FileUtil.file("d:/"), new StreamProgress() {
|
HttpUtil.downloadFile("http://mirrors.sohu.com/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso", FileUtil.file("d:/"), new StreamProgress() {
|
||||||
|
|
||||||
final long time = System.currentTimeMillis();
|
final long time = System.currentTimeMillis();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user