public class FtpDownloader extends BaseFileDownloader
bufferSize, fileSizeEqualOverride, forceOverride, local, lock, progress, remote, remoteFileLength
Constructor and Description |
---|
FtpDownloader(IFtpInstance instance,
String remote,
File local) |
FtpDownloader(IFtpInstance instance,
String remote,
String local) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
终止传输
|
void |
close()
安全关闭
|
IFtpInstance |
getInstance() |
protected long |
getRemoteFileSize()
获取远程文件大小
|
protected void |
initDownload(boolean breakPoint,
long skip)
准开始下载
|
protected int |
read(byte[] bs)
读取数据
|
void |
run() |
protected void |
transferFinish()
传输完成回调
|
breakPointResume, checkRemoteFilePresentSizeEqual, download, fileSizeEqualOverride, forceOverride, getProgress, getRemoteFileLength, startDownload
public FtpDownloader(IFtpInstance instance, String remote, String local)
public FtpDownloader(IFtpInstance instance, String remote, File local)
public void run()
protected long getRemoteFileSize()
BaseFileDownloader
getRemoteFileSize
in class BaseFileDownloader
protected void initDownload(boolean breakPoint, long skip) throws IOException
BaseFileDownloader
initDownload
in class BaseFileDownloader
breakPoint
- 是否为断点续传skip
- 跳过的长度IOException
- IOExceptionprotected int read(byte[] bs) throws IOException
BaseFileDownloader
read
in class BaseFileDownloader
bs
- bsIOException
- IOExceptionprotected void transferFinish()
BaseFileDownloader
transferFinish
in class BaseFileDownloader
public void close()
SafeCloseable
public void abort()
IFileTransfer
public IFtpInstance getInstance()
Copyright © 2024. All rights reserved.