@@ -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 }
0 commit comments