public class FtpUploader extends BaseFileUploader
bufferSize, fileSizeEqualOverride, forceOverride, local, lock, progress, remote, remoteFileLength
Constructor and Description |
---|
FtpUploader(FtpInstance instance,
String remote,
File local) |
FtpUploader(FtpInstance instance,
String remote,
String local) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
终止传输
|
void |
close()
安全关闭
|
IFtpInstance |
getInstance() |
protected long |
getRemoteFileSize()
获取远程文件大小
|
protected void |
initUpload(boolean breakPoint,
long skip)
准开始上传
|
void |
run() |
protected void |
transferFinish()
传输完成回调
|
protected void |
write(byte[] bs,
int len)
写入
|
breakPointResume, checkRemoteFilePresentSizeEqual, fileSizeEqualOverride, forceOverride, getProgress, getRemoteFileLength, startUpload, upload
public FtpUploader(FtpInstance instance, String remote, String local)
public FtpUploader(FtpInstance instance, String remote, File local)
public void run()
protected long getRemoteFileSize()
BaseFileUploader
getRemoteFileSize
in class BaseFileUploader
protected void initUpload(boolean breakPoint, long skip) throws IOException
BaseFileUploader
initUpload
in class BaseFileUploader
breakPoint
- 是否为断点续传skip
- skipIOException
- IOExceptionprotected void write(byte[] bs, int len) throws IOException
BaseFileUploader
write
in class BaseFileUploader
bs
- bslen
- 长度IOException
- IOExceptionprotected void transferFinish()
BaseFileUploader
transferFinish
in class BaseFileUploader
public void close()
SafeCloseable
public void abort()
IFileTransfer
public IFtpInstance getInstance()
Copyright © 2024. All rights reserved.