From fdb0eaa589a7ec65a22ee793ddaddd7347dc2cf5 Mon Sep 17 00:00:00 2001 From: "Joshua.Yin" Date: Tue, 16 Mar 2021 21:32:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0ignore=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 59ef038..668ff49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ *.DS_Store out -target +target/ .gradle .idea -build -*.iml \ No newline at end of file +build/ +*.iml +class/ \ No newline at end of file From 63f9157f8b664af852046932402d2cfd5d53bc6c Mon Sep 17 00:00:00 2001 From: "Joshua.Yin" Date: Tue, 16 Mar 2021 21:33:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0ignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 668ff49..7a85cc1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ target/ .idea build/ *.iml -class/ \ No newline at end of file +classes/ \ No newline at end of file From 31718eabc7e0609255bdef45c410c2b9d6ed62b8 Mon Sep 17 00:00:00 2001 From: "joshua.yin" Date: Thu, 18 Nov 2021 17:35:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?release=202.6.6=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=B8=8B=E8=BD=BD=E8=B6=85=E8=BF=872G?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ufile-sample-java/pom.xml | 2 +- ufile/pom.xml | 5 ++++- ufile/ufile-client-java/pom.xml | 6 +++--- .../ucloud/ufile/api/object/DownloadFileApi.java | 14 ++++++++------ ufile/ufile-core/pom.xml | 4 ++-- .../main/java/cn/ucloud/ufile/UfileConstants.java | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ufile-sample-java/pom.xml b/ufile-sample-java/pom.xml index 8794db4..ee113dc 100644 --- a/ufile-sample-java/pom.xml +++ b/ufile-sample-java/pom.xml @@ -55,7 +55,7 @@ cn.ucloud.ufile ufile-client-java - 2.6.5 + 2.6.6 diff --git a/ufile/pom.xml b/ufile/pom.xml index 2299469..845233e 100644 --- a/ufile/pom.xml +++ b/ufile/pom.xml @@ -7,7 +7,7 @@ cn.ucloud.ufile ufile pom - 2.6.5 + 2.6.6 ufile-core @@ -131,6 +131,9 @@ org.apache.maven.plugins maven-gpg-plugin ${plugin.maven.gpg.version} + + true + verify diff --git a/ufile/ufile-client-java/pom.xml b/ufile/ufile-client-java/pom.xml index a375778..4f99530 100644 --- a/ufile/ufile-client-java/pom.xml +++ b/ufile/ufile-client-java/pom.xml @@ -6,11 +6,11 @@ ufile cn.ucloud.ufile - 2.6.5 + 2.6.6 ufile-client-java - 2.6.5 + 2.6.6 @@ -26,7 +26,7 @@ cn.ucloud.ufile ufile-core - 2.6.5 + 2.6.6 diff --git a/ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/DownloadFileApi.java b/ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/DownloadFileApi.java index fed6ad3..c3dbb21 100644 --- a/ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/DownloadFileApi.java +++ b/ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/DownloadFileApi.java @@ -89,7 +89,7 @@ public class DownloadFileApi extends UfileObjectApi { /** * 分片数量 */ - private int partCount = 0; + private long partCount = 0; /** * 分片任务集 */ @@ -224,7 +224,7 @@ public DownloadFileApi setBufferSize(int bufferSize) { protected void prepareData() throws UfileClientException { parameterValidat(); - partCount = 0; + partCount = 0L; File dir = new File(localPath); if (!dir.exists() || (dir.exists() && !dir.isDirectory())) @@ -260,7 +260,8 @@ protected void prepareData() throws UfileClientException { .withAuthOptionalData(authOptionalData) .createUrl(); - partCount = (int) Math.ceil(totalSize * 1.d / UfileConstants.MULTIPART_SIZE); + partCount = (long) Math.ceil(totalSize * 1.d / UfileConstants.MULTIPART_SIZE); + JLog.E(TAG, "[partCount]:" + partCount); switch (progressConfig.type) { case PROGRESS_INTERVAL_TIME: { @@ -287,9 +288,10 @@ protected void prepareData() throws UfileClientException { bytesWrittenCache = new AtomicLong(0); callList = new ArrayList<>(); - for (int i = 0; i < partCount; i++) { + for (long i = 0L; i < partCount; i++) { long start = Math.max(i * UfileConstants.MULTIPART_SIZE, rangeStart); long end = Math.min(rangeEnd, (start + UfileConstants.MULTIPART_SIZE)); + JLog.E(TAG, "[range]:" + String.format("bytes=%d-%d", start, end)); GetRequestBuilder builder = (GetRequestBuilder) new GetRequestBuilder() .baseUrl(host) .addHeader("Range", String.format("bytes=%d-%d", start, end)); @@ -495,9 +497,9 @@ public void run() { private class DownloadCallable implements Callable { private Call call; - private int index; + private long index; - public DownloadCallable(Call call, int index) { + public DownloadCallable(Call call, long index) { this.call = call; this.index = index; } diff --git a/ufile/ufile-core/pom.xml b/ufile/ufile-core/pom.xml index 1f496ae..ded8072 100644 --- a/ufile/ufile-core/pom.xml +++ b/ufile/ufile-core/pom.xml @@ -6,11 +6,11 @@ cn.ucloud.ufile ufile - 2.6.5 + 2.6.6 ufile-core - 2.6.5 + 2.6.6 diff --git a/ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java b/ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java index 898ddd2..723c6a7 100644 --- a/ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java +++ b/ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java @@ -6,7 +6,7 @@ * @date: 2018/11/22 15:00 */ public class UfileConstants { - public static final String SDK_VERSION = "2.6.5"; + public static final String SDK_VERSION = "2.6.6"; /** * 默认分片大小(4MB) */