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 intprivate static final intDefault bandwidth limit for SCP transfer in kilobit/s (-1 means unlimited)private final SessionFactoryFields inherited from class AbstractFileTransfer
log, loggerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbandwidthLimit(int limit) private voidcheckByteOffsetSupport(long byteOffset) voidThis is meant to delegate toFileTransfer.download(String, LocalDestFile)with thelocalPathwrapped as e.g.voidThis is meant to delegate toFileTransfer.download(String, LocalDestFile)with thelocalPathwrapped as e.g.voiddownload(String remotePath, LocalDestFile localFile) DownloadremotePathtolocalFile.voiddownload(String remotePath, LocalDestFile localFile, long byteOffset) DownloadremotePathtolocalFile.private SCPEnginevoidThis is meant to delegate toFileTransfer.upload(LocalSourceFile, String)with thelocalPathwrapped as e.g.voidThis is meant to delegate toFileTransfer.upload(LocalSourceFile, String)with thelocalPathwrapped as e.g.voidupload(LocalSourceFile localFile, String remotePath) UploadlocalFiletoremotePath.voidupload(LocalSourceFile localFile, String remotePath, long byteOffset) UploadlocalFiletoremotePath.Methods inherited from class AbstractFileTransfer
getTransferListener, setTransferListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:FileTransferThis is meant to delegate toFileTransfer.upload(LocalSourceFile, String)with thelocalPathwrapped as e.g. aFileSystemFile.- Specified by:
uploadin interfaceFileTransfer- Parameters:
localPath-remotePath-- Throws:
IOException
-
upload
Description copied from interface:FileTransferThis is meant to delegate toFileTransfer.upload(LocalSourceFile, String)with thelocalPathwrapped as e.g. aFileSystemFile. Appends to existing ifbyteOffset> 0.- Specified by:
uploadin interfaceFileTransfer- Parameters:
localFile-remotePath-byteOffset-- Throws:
IOException
-
download
Description copied from interface:FileTransferThis is meant to delegate toFileTransfer.download(String, LocalDestFile)with thelocalPathwrapped as e.g. aFileSystemFile.- Specified by:
downloadin interfaceFileTransfer- Parameters:
remotePath-localPath-- Throws:
IOException
-
download
Description copied from interface:FileTransferThis is meant to delegate toFileTransfer.download(String, LocalDestFile)with thelocalPathwrapped as e.g. aFileSystemFile. Appends to existing ifbyteOffset> 0.- Specified by:
downloadin interfaceFileTransfer- Parameters:
remotePath-localPath-byteOffset-- Throws:
IOException
-
download
Description copied from interface:FileTransferDownloadremotePathtolocalFile.- Specified by:
downloadin interfaceFileTransfer- Parameters:
remotePath-localFile-- Throws:
IOException
-
download
public void download(String remotePath, LocalDestFile localFile, long byteOffset) throws IOException Description copied from interface:FileTransferDownloadremotePathtolocalFile. Appends to existing ifbyteOffset> 0.- Specified by:
downloadin interfaceFileTransfer- Parameters:
remotePath-localFile-byteOffset-- Throws:
IOException
-
upload
Description copied from interface:FileTransferUploadlocalFiletoremotePath.- Specified by:
uploadin interfaceFileTransfer- Parameters:
localFile-remotePath-- Throws:
IOException
-
upload
public void upload(LocalSourceFile localFile, String remotePath, long byteOffset) throws IOException Description copied from interface:FileTransferUploadlocalFiletoremotePath. Appends to existing ifbyteOffset> 0.- Specified by:
uploadin interfaceFileTransfer- Parameters:
localFile-remotePath-byteOffset-- Throws:
IOException
-
bandwidthLimit
-
checkByteOffsetSupport
- Throws:
IOException
-