| Modifier and Type | Class and Description |
|---|---|
class |
ScpClientIO.ScpEngineIO
Implements an SCP engine.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
packetSize |
protected SshClient |
ssh |
protected int |
windowSpace |
| Constructor and Description |
|---|
ScpClientIO(SshClient ssh)
Creates an SCP client.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
get(String remoteFile)
Gets a remote file as a
java.io.InputStream. |
InputStream |
get(String remoteFile,
FileTransferProgress progress)
Gets a remote file as a
java.io.InputStream. |
void |
put(InputStream in,
long length,
String localFile,
String remoteFile)
Uploads a
java.io.InputStream to a remote server as a file. |
void |
put(InputStream in,
long length,
String localFile,
String remoteFile,
boolean remoteIsDir,
FileTransferProgress progress) |
void |
put(InputStream in,
long length,
String localFile,
String remoteFile,
FileTransferProgress progress)
Uploads a
java.io.InputStream to a remote server as a file. |
void |
setPacketSize(int packetSize) |
void |
setWindowSpace(int windowSpace) |
protected SshClient ssh
protected int windowSpace
protected int packetSize
public ScpClientIO(SshClient ssh)
Creates an SCP client.
ssh - a connected SshClientpublic void setWindowSpace(int windowSpace)
public void setPacketSize(int packetSize)
public void put(InputStream in, long length, String localFile, String remoteFile) throws SshException, ChannelOpenException
Uploads a java.io.InputStream to a remote server as a file.
You must supply the correct number of bytes that will be
written.
in - stream providing filelength - number of bytes that will be writtenlocalFile - local file nameremoteFile - remote file nameIOException - on any errorSshExceptionChannelOpenExceptionpublic void put(InputStream in, long length, String localFile, String remoteFile, FileTransferProgress progress) throws SshException, ChannelOpenException
Uploads a java.io.InputStream to a remote server as a file.
You must supply the correct number of bytes that will be
written.
in - stream providing filelength - number of bytes that will be writtenlocalFile - local file nameremoteFile - remote file nameprogress - a file transfer progress implementationIOException - on any errorSshExceptionChannelOpenExceptionpublic void put(InputStream in, long length, String localFile, String remoteFile, boolean remoteIsDir, FileTransferProgress progress) throws SshException, ChannelOpenException
in - length - localFile - remoteFile - remoteIsDir - progress - SshExceptionChannelOpenExceptionpublic InputStream get(String remoteFile) throws SshException, ChannelOpenException
Gets a remote file as a java.io.InputStream.
remoteFile - remote file nameIOException - on any errorSshExceptionChannelOpenExceptionpublic InputStream get(String remoteFile, FileTransferProgress progress) throws SshException, ChannelOpenException
Gets a remote file as a java.io.InputStream.
remoteFile - remote file nameprogress - a file transfer progress implementation.IOException - on any errorSshExceptionChannelOpenExceptionCopyright © 2025. All rights reserved.