Package net.schmizz.sshj.sftp
Class SFTPFileTransfer
- java.lang.Object
-
- net.schmizz.sshj.xfer.AbstractFileTransfer
-
- net.schmizz.sshj.sftp.SFTPFileTransfer
-
- All Implemented Interfaces:
FileTransfer
public class SFTPFileTransfer extends AbstractFileTransfer implements FileTransfer
-
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.xfer.AbstractFileTransfer
log, loggerFactory
-
-
Constructor Summary
Constructors Constructor Description SFTPFileTransfer(SFTPEngine engine)
-
Method Summary
Modifier and Type Method Description void
download(java.lang.String source, java.lang.String dest)
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g.void
download(java.lang.String source, java.lang.String dest, long byteOffset)
This is meant to delegate toFileTransfer.download(String, LocalDestFile)
with thelocalPath
wrapped as e.g.void
download(java.lang.String source, LocalDestFile dest)
DownloadremotePath
tolocalFile
.void
download(java.lang.String source, LocalDestFile dest, long byteOffset)
DownloadremotePath
tolocalFile
.RemoteResourceFilter
getDownloadFilter()
boolean
getPreserveAttributes()
LocalFileFilter
getUploadFilter()
void
setDownloadFilter(RemoteResourceFilter downloadFilter)
void
setPreserveAttributes(boolean preserveAttributes)
void
setUploadFilter(LocalFileFilter uploadFilter)
void
upload(java.lang.String source, java.lang.String dest)
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g.void
upload(java.lang.String source, java.lang.String dest, long byteOffset)
This is meant to delegate toFileTransfer.upload(LocalSourceFile, String)
with thelocalPath
wrapped as e.g.void
upload(LocalSourceFile localFile, java.lang.String remotePath)
UploadlocalFile
toremotePath
.void
upload(LocalSourceFile localFile, java.lang.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
-
-
-
-
Constructor Detail
-
SFTPFileTransfer
public SFTPFileTransfer(SFTPEngine engine)
-
-
Method Detail
-
getPreserveAttributes
public boolean getPreserveAttributes()
-
setPreserveAttributes
public void setPreserveAttributes(boolean preserveAttributes)
-
upload
public void upload(java.lang.String source, java.lang.String dest) throws java.io.IOException
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
- Throws:
java.io.IOException
-
upload
public void upload(java.lang.String source, java.lang.String dest, long byteOffset) throws java.io.IOException
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
- Throws:
java.io.IOException
-
download
public void download(java.lang.String source, java.lang.String dest) throws java.io.IOException
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
- Throws:
java.io.IOException
-
download
public void download(java.lang.String source, java.lang.String dest, long byteOffset) throws java.io.IOException
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
- Throws:
java.io.IOException
-
upload
public void upload(LocalSourceFile localFile, java.lang.String remotePath) throws java.io.IOException
Description copied from interface:FileTransfer
UploadlocalFile
toremotePath
.- Specified by:
upload
in interfaceFileTransfer
- Throws:
java.io.IOException
-
upload
public void upload(LocalSourceFile localFile, java.lang.String remotePath, long byteOffset) throws java.io.IOException
Description copied from interface:FileTransfer
UploadlocalFile
toremotePath
. Appends to existing ifbyteOffset
> 0.- Specified by:
upload
in interfaceFileTransfer
- Throws:
java.io.IOException
-
download
public void download(java.lang.String source, LocalDestFile dest) throws java.io.IOException
Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
.- Specified by:
download
in interfaceFileTransfer
- Throws:
java.io.IOException
-
download
public void download(java.lang.String source, LocalDestFile dest, long byteOffset) throws java.io.IOException
Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
. Appends to existing ifbyteOffset
> 0.- Specified by:
download
in interfaceFileTransfer
- Throws:
java.io.IOException
-
setUploadFilter
public void setUploadFilter(LocalFileFilter uploadFilter)
-
setDownloadFilter
public void setDownloadFilter(RemoteResourceFilter downloadFilter)
-
getUploadFilter
public LocalFileFilter getUploadFilter()
-
getDownloadFilter
public RemoteResourceFilter getDownloadFilter()
-
-