Save This Page
Home » j2ssh-0.2.9-src » com.sshtools.j2ssh » [javadoc | source]
com.sshtools.j2ssh
public final class: ScpClient [javadoc | source]
java.lang.Object
   com.sshtools.j2ssh.ScpClient

Implements a Secure Copy (SCP) client. This may be useful when the server does not support SFTP.

Nested Class Summary:
class  ScpClient.ScpChannel  

Implements an SCP channel by extending the SessionChannelClient.

 
class  ScpClient.ScpInputStream   
Constructor:
 public ScpClient(SshClient ssh,
    boolean verbose,
    ChannelEventListener eventListener) 

    Creates an SCP client. CWD (Current working directory) will be the CWD of the process that started this JVM.

    Parameters:
    ssh - A connected SshClient
    verbose - Output verbose detail
    eventListener -
    since: 0.2.0 -
 public ScpClient(File cwd,
    SshClient ssh,
    boolean verbose,
    ChannelEventListener eventListener) 

    Creates an SCP client.

    Parameters:
    cwd - The current local directory
    ssh - A connected SshClient
    verbose - Output verbose detail
    eventListener -
    since: 0.2.0 -
Method from com.sshtools.j2ssh.ScpClient Summary:
get,   get,   get,   put,   put,   put
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sshtools.j2ssh.ScpClient Detail:
 public InputStream get(String remoteFile) throws IOException 

    Gets a remote file as an java.io.InputStream.

 public  void get(String localFile,
    String[] remoteFiles,
    boolean recursive) throws IOException 

    Downloads an array of remote files to the local computer.

 public  void get(String localFile,
    String remoteFile,
    boolean recursive) throws IOException 

    Downloads a remote file onto the local computer.

 public  void put(String localFile,
    String remoteFile,
    boolean recursive) throws IOException 

    Uploads a local file onto the remote server.

 public  void put(String[] localFiles,
    String remoteFile,
    boolean recursive) throws IOException 

    Uploads an array of local files onto the remote server.

 public  void put(InputStream in,
    long length,
    String localFile,
    String remoteFile) throws IOException 

    Uploads a java.io.InputStream to a remove server as file. You must supply the correct number of bytes that will be written.