|
|
|
|
@ -1,5 +1,7 @@ |
|
|
|
|
package com.xunlei.downloadlib.parameter; |
|
|
|
|
|
|
|
|
|
import com.github.catvod.utils.Path; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
|
|
|
|
|
public class GetTaskId { |
|
|
|
|
@ -13,6 +15,15 @@ public class GetTaskId { |
|
|
|
|
this.mSavePath = savePath; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public GetTaskId(String url, File savePath) { |
|
|
|
|
File file = new File(url.substring(7)); |
|
|
|
|
File dest = new File(savePath, file.getName()); |
|
|
|
|
Path.copy(file, dest); |
|
|
|
|
this.mFileName = file.getName(); |
|
|
|
|
this.mSavePath = savePath; |
|
|
|
|
this.mRealUrl = url; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public GetTaskId(File savePath, String fileName, String realUrl) { |
|
|
|
|
this.mSavePath = savePath; |
|
|
|
|
this.mFileName = fileName; |
|
|
|
|
|