diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirDownloadUtil.java b/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirDownloadUtil.java index e04ce09b..ecb73e44 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirDownloadUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirDownloadUtil.java @@ -23,7 +23,8 @@ import com.arialyy.aria.core.inf.IEntity; import com.arialyy.aria.exception.BaseException; /** - * Created by Aria.Lao on 2017/7/27. ftp文件夹下载工具 + * Created by Aria.Lao on 2017/7/27. + * ftp文件夹下载工具 */ public class FtpDirDownloadUtil extends AbsGroupUtil { private String TAG = "FtpDirDownloadUtil"; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirInfoThread.java b/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirInfoThread.java index b9e3ab4c..7f8be3c1 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirInfoThread.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/group/FtpDirInfoThread.java @@ -69,6 +69,7 @@ class FtpDirInfoThread extends AbsFtpInfoThread { /** * HTTP单任务载 */ - int D_HTTP = 0x11; + int D_HTTP = 1; /** * HTTP任务组下载 */ - int DG_HTTP = 0x12; + int DG_HTTP = 2; /** * FTP单文件下载 */ - int D_FTP = 0x13; + int D_FTP = 3; /** * FTP文件夹下载,为避免登录过多,子任务由单线程进行处理 */ - int D_FTP_DIR = 0x14; + int D_FTP_DIR = 4; /** * HTTP单文件上传 */ - int U_HTTP = 0xA1; + int U_HTTP = 5; /** * FTP单文件上传 */ - int U_FTP = 0xA2; + int U_FTP = 6; ENTITY getEntity(); } diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpThreadTask.java b/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpThreadTask.java index 88eddc5d..06c929f2 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpThreadTask.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpThreadTask.java @@ -141,7 +141,6 @@ class FtpThreadTask extends AbsFtpThreadTask { * 上传 * * @return {@code true}上传成功、{@code false} 上传失败 - * @throws IOException */ private boolean upload(final FTPClient client, final BufferedRandomAccessFile bis) throws IOException { diff --git a/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java b/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java index 45fca4fd..74bffff4 100644 --- a/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java @@ -64,7 +64,7 @@ public class FtpDownloadActivity extends BaseActivity { - private static final String dir = "ftp://192.168.1.2:21/upload/测试"; + private static final String dir = "ftp://9.9.9.50:21/upload/测试"; @Bind(R.id.child_list) SubStateLinearLayout mChildList; diff --git a/app/src/main/java/com/arialyy/simple/upload/FtpUploadActivity.java b/app/src/main/java/com/arialyy/simple/upload/FtpUploadActivity.java index ff55fdf4..5bd4c6b9 100644 --- a/app/src/main/java/com/arialyy/simple/upload/FtpUploadActivity.java +++ b/app/src/main/java/com/arialyy/simple/upload/FtpUploadActivity.java @@ -43,7 +43,6 @@ public class FtpUploadActivity extends BaseActivity { super.init(savedInstanceState); Aria.upload(this).register(); UploadEntity entity = Aria.upload(this).getUploadEntity(FILE_PATH); - ALog.d(TAG, "pare = >" + entity.getPercent()); if (entity != null) { getBinding().setFileSize(CommonUtil.formatFileSize(entity.getFileSize())); getBinding().setProgress(entity.isComplete() ? 100