Package net.schmizz.sshj.sftp
Class SFTPFileTransfer
java.lang.Object
net.schmizz.sshj.xfer.AbstractFileTransfer
net.schmizz.sshj.sftp.SFTPFileTransfer
- All Implemented Interfaces:
FileTransfer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RemoteResourceFilter
private final SFTPEngine
private boolean
private LocalFileFilter
Fields inherited from class net.schmizz.sshj.xfer.AbstractFileTransfer
log, loggerFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g.void
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g.void
download
(String source, LocalDestFile dest) DownloadremotePath
tolocalFile
.void
download
(String source, LocalDestFile dest, long byteOffset) DownloadremotePath
tolocalFile
.boolean
void
setDownloadFilter
(RemoteResourceFilter downloadFilter) void
setPreserveAttributes
(boolean preserveAttributes) void
setUploadFilter
(LocalFileFilter uploadFilter) void
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g.void
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g.void
upload
(LocalSourceFile localFile, String remotePath) UploadlocalFile
toremotePath
.void
upload
(LocalSourceFile localFile, String remotePath, long byteOffset) UploadlocalFile
toremotePath
.Methods inherited from class net.schmizz.sshj.xfer.AbstractFileTransfer
getTransferListener, setTransferListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.schmizz.sshj.xfer.FileTransfer
getTransferListener, setTransferListener
-
Field Details
-
engine
-
uploadFilter
-
downloadFilter
-
preserveAttributes
private volatile boolean preserveAttributes
-
-
Constructor Details
-
SFTPFileTransfer
-
-
Method Details
-
getPreserveAttributes
public boolean getPreserveAttributes() -
setPreserveAttributes
public void setPreserveAttributes(boolean preserveAttributes) -
upload
Description copied from interface:FileTransfer
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g. aFileSystemFile
.- Specified by:
upload
in interfaceFileTransfer
- Parameters:
source
-dest
-- Throws:
IOException
-
upload
Description copied from interface:FileTransfer
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g. aFileSystemFile
. Appends to existing ifbyteOffset
> 0.- Specified by:
upload
in interfaceFileTransfer
- Parameters:
source
-dest
-byteOffset
-- Throws:
IOException
-
download
Description copied from interface:FileTransfer
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g. aFileSystemFile
.- Specified by:
download
in interfaceFileTransfer
- Parameters:
source
-dest
-- Throws:
IOException
-
download
Description copied from interface:FileTransfer
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g. aFileSystemFile
. Appends to existing ifbyteOffset
> 0.- Specified by:
download
in interfaceFileTransfer
- Parameters:
source
-dest
-byteOffset
-- Throws:
IOException
-
upload
Description copied from interface:FileTransfer
UploadlocalFile
toremotePath
.- Specified by:
upload
in interfaceFileTransfer
- Parameters:
localFile
-remotePath
-- Throws:
IOException
-
upload
public void upload(LocalSourceFile localFile, String remotePath, long byteOffset) throws IOException Description copied from interface:FileTransfer
UploadlocalFile
toremotePath
. Appends to existing ifbyteOffset
> 0.- Specified by:
upload
in interfaceFileTransfer
- Parameters:
localFile
-remotePath
-byteOffset
-- Throws:
IOException
-
download
Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
.- Specified by:
download
in interfaceFileTransfer
- Parameters:
source
-dest
-- Throws:
IOException
-
download
Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
. Appends to existing ifbyteOffset
> 0.- Specified by:
download
in interfaceFileTransfer
- Parameters:
source
-dest
-byteOffset
-- Throws:
IOException
-
setUploadFilter
-
setDownloadFilter
-
getUploadFilter
-
getDownloadFilter
-