Package net.schmizz.sshj.xfer.scp
Class SCPFileTransfer
java.lang.Object
net.schmizz.sshj.xfer.AbstractFileTransfer
net.schmizz.sshj.xfer.scp.SCPFileTransfer
- All Implemented Interfaces:
FileTransfer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final int
Default bandwidth limit for SCP transfer in kilobit/s (-1 means unlimited)private final SessionFactory
Fields inherited from class net.schmizz.sshj.xfer.AbstractFileTransfer
log, loggerFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbandwidthLimit
(int limit) private void
checkByteOffsetSupport
(long byteOffset) void
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 remotePath, LocalDestFile localFile) DownloadremotePath
tolocalFile
.void
download
(String remotePath, LocalDestFile localFile, long byteOffset) DownloadremotePath
tolocalFile
.private SCPEngine
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
-
DEFAULT_BANDWIDTH_LIMIT
private static final int DEFAULT_BANDWIDTH_LIMITDefault bandwidth limit for SCP transfer in kilobit/s (-1 means unlimited)- See Also:
-
sessionFactory
-
bandwidthLimit
private int bandwidthLimit
-
-
Constructor Details
-
SCPFileTransfer
-
-
Method Details
-
newSCPDownloadClient
-
newSCPUploadClient
-
newSCPEngine
-
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:
localPath
-remotePath
-- 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:
localFile
-remotePath
-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:
remotePath
-localPath
-- 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:
remotePath
-localPath
-byteOffset
-- Throws:
IOException
-
download
Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
.- Specified by:
download
in interfaceFileTransfer
- Parameters:
remotePath
-localFile
-- Throws:
IOException
-
download
public void download(String remotePath, LocalDestFile localFile, long byteOffset) throws IOException Description copied from interface:FileTransfer
DownloadremotePath
tolocalFile
. Appends to existing ifbyteOffset
> 0.- Specified by:
download
in interfaceFileTransfer
- Parameters:
remotePath
-localFile
-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
-
bandwidthLimit
-
checkByteOffsetSupport
- Throws:
IOException
-