Skip to content

Commit db147d2

Browse files
author
joshua.yin
authored
Merge pull request #52 from JoshuaYin/master
Release 2.6.6
2 parents 3816dea + 05595a3 commit db147d2

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ build
77
*.iml
88
.classpath
99
.project
10-
.settings/
10+
.settings/

ufile-sample-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>cn.ucloud.ufile</groupId>
5757
<artifactId>ufile-client-java</artifactId>
58-
<version>2.6.5</version>
58+
<version>2.6.6</version>
5959
</dependency>
6060
</dependencies>
6161

ufile/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>cn.ucloud.ufile</groupId>
88
<artifactId>ufile</artifactId>
99
<packaging>pom</packaging>
10-
<version>2.6.5</version>
10+
<version>2.6.6</version>
1111

1212
<modules>
1313
<module>ufile-core</module>
@@ -131,6 +131,9 @@
131131
<groupId>org.apache.maven.plugins</groupId>
132132
<artifactId>maven-gpg-plugin</artifactId>
133133
<version>${plugin.maven.gpg.version}</version>
134+
<configuration>
135+
<skip>true</skip>
136+
</configuration>
134137
<executions>
135138
<execution>
136139
<phase>verify</phase>

ufile/ufile-client-java/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<artifactId>ufile</artifactId>
88
<groupId>cn.ucloud.ufile</groupId>
9-
<version>2.6.5</version>
9+
<version>2.6.6</version>
1010
</parent>
1111

1212
<artifactId>ufile-client-java</artifactId>
13-
<version>2.6.5</version>
13+
<version>2.6.6</version>
1414

1515
<dependencies>
1616
<dependency>
@@ -26,7 +26,7 @@
2626
<dependency>
2727
<groupId>cn.ucloud.ufile</groupId>
2828
<artifactId>ufile-core</artifactId>
29-
<version>2.6.5</version>
29+
<version>2.6.6</version>
3030
</dependency>
3131
</dependencies>
3232

ufile/ufile-client-java/src/main/java/cn/ucloud/ufile/api/object/DownloadFileApi.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public class DownloadFileApi extends UfileObjectApi<DownloadFileBean> {
8989
/**
9090
* 分片数量
9191
*/
92-
private int partCount = 0;
92+
private long partCount = 0;
9393
/**
9494
* 分片任务集
9595
*/
@@ -224,7 +224,7 @@ public DownloadFileApi setBufferSize(int bufferSize) {
224224
protected void prepareData() throws UfileClientException {
225225
parameterValidat();
226226

227-
partCount = 0;
227+
partCount = 0L;
228228

229229
File dir = new File(localPath);
230230
if (!dir.exists() || (dir.exists() && !dir.isDirectory()))
@@ -260,7 +260,8 @@ protected void prepareData() throws UfileClientException {
260260
.withAuthOptionalData(authOptionalData)
261261
.createUrl();
262262

263-
partCount = (int) Math.ceil(totalSize * 1.d / UfileConstants.MULTIPART_SIZE);
263+
partCount = (long) Math.ceil(totalSize * 1.d / UfileConstants.MULTIPART_SIZE);
264+
JLog.E(TAG, "[partCount]:" + partCount);
264265

265266
switch (progressConfig.type) {
266267
case PROGRESS_INTERVAL_TIME: {
@@ -287,9 +288,10 @@ protected void prepareData() throws UfileClientException {
287288
bytesWrittenCache = new AtomicLong(0);
288289

289290
callList = new ArrayList<>();
290-
for (int i = 0; i < partCount; i++) {
291+
for (long i = 0L; i < partCount; i++) {
291292
long start = Math.max(i * UfileConstants.MULTIPART_SIZE, rangeStart);
292293
long end = Math.min(rangeEnd, (start + UfileConstants.MULTIPART_SIZE));
294+
JLog.E(TAG, "[range]:" + String.format("bytes=%d-%d", start, end));
293295
GetRequestBuilder builder = (GetRequestBuilder) new GetRequestBuilder()
294296
.baseUrl(host)
295297
.addHeader("Range", String.format("bytes=%d-%d", start, end));
@@ -495,9 +497,9 @@ public void run() {
495497

496498
private class DownloadCallable implements Callable<DownloadFileBean> {
497499
private Call call;
498-
private int index;
500+
private long index;
499501

500-
public DownloadCallable(Call call, int index) {
502+
public DownloadCallable(Call call, long index) {
501503
this.call = call;
502504
this.index = index;
503505
}

ufile/ufile-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<groupId>cn.ucloud.ufile</groupId>
88
<artifactId>ufile</artifactId>
9-
<version>2.6.5</version>
9+
<version>2.6.6</version>
1010
</parent>
1111

1212
<artifactId>ufile-core</artifactId>
13-
<version>2.6.5</version>
13+
<version>2.6.6</version>
1414

1515
<dependencies>
1616
<dependency>

ufile/ufile-core/src/main/java/cn/ucloud/ufile/UfileConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @date: 2018/11/22 15:00
77
*/
88
public class UfileConstants {
9-
public static final String SDK_VERSION = "2.6.5";
9+
public static final String SDK_VERSION = "2.6.6";
1010
/**
1111
* 默认分片大小(4MB)
1212
*/

0 commit comments

Comments
 (0)