public class SftpDownloader extends BaseFileDownloader
bufferSize, fileSizeEqualOverride, forceOverride, local, lock, progress, remote, remoteFileLength| Constructor and Description |
|---|
SftpDownloader(SftpExecutor executor,
String remote,
File local) |
SftpDownloader(SftpExecutor executor,
String remote,
String local) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
终止传输
|
void |
close()
安全关闭
|
SftpExecutor |
getExecutor() |
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, startDownloadpublic SftpDownloader(SftpExecutor executor, String remote, String local)
public SftpDownloader(SftpExecutor executor, String remote, File local)
public void run()
protected long getRemoteFileSize()
BaseFileDownloadergetRemoteFileSize in class BaseFileDownloaderprotected void initDownload(boolean breakPoint,
long skip)
throws IOException
BaseFileDownloaderinitDownload in class BaseFileDownloaderbreakPoint - 是否为断点续传skip - 跳过的长度IOException - IOExceptionprotected int read(byte[] bs)
throws IOException
BaseFileDownloaderread in class BaseFileDownloaderbs - bsIOException - IOExceptionprotected void transferFinish()
BaseFileDownloadertransferFinish in class BaseFileDownloaderpublic void close()
SafeCloseablepublic void abort()
IFileTransferpublic SftpExecutor getExecutor()
Copyright © 2025. All rights reserved.