net.ssh.jsch
Class ChannelSftp

java.lang.Object
  extended by net.ssh.jsch.Channel
      extended by net.ssh.jsch.ChannelSftp
All Implemented Interfaces:
java.lang.Runnable

public class ChannelSftp
extends Channel


Nested Class Summary
static class ChannelSftp.Ssh_exp_name
           
 
Field Summary
static int APPEND
           
static int OVERWRITE
           
static int RESUME
           
static int SSH_FX_BAD_MESSAGE
           
static int SSH_FX_CONNECTION_LOST
           
static int SSH_FX_EOF
           
static int SSH_FX_FAILURE
           
static int SSH_FX_NO_CONNECTION
           
static int SSH_FX_NO_SUCH_FILE
           
static int SSH_FX_OK
           
static int SSH_FX_OP_UNSUPPORTED
           
static int SSH_FX_PERMISSION_DENIED
           
 
Constructor Summary
ChannelSftp()
           
 
Method Summary
 void cd(java.lang.String path)
           
 void chgrp(int gid, java.lang.String path)
           
 void chmod(int permissions, java.lang.String path)
           
 void chown(int uid, java.lang.String path)
           
 void exit()
           
 java.io.InputStream get(java.lang.String src)
           
 java.io.InputStream get(java.lang.String src, int mode)
           
 void get(java.lang.String src, java.io.OutputStream dst)
           
 void get(java.lang.String src, java.io.OutputStream dst, SftpProgressMonitor monitor)
           
 java.io.InputStream get(java.lang.String src, SftpProgressMonitor monitor, int mode)
           
 void get(java.lang.String src, java.lang.String dst)
           
 void get(java.lang.String src, java.lang.String dst, SftpProgressMonitor monitor)
           
 void get(java.lang.String src, java.lang.String dst, SftpProgressMonitor monitor, int mode)
           
 void init()
           
 void lcd(java.lang.String path)
           
 java.lang.String lpwd()
           
 java.util.Vector ls(java.lang.String path)
           
 SftpATTRS lstat(java.lang.String path)
           
 void mkdir(java.lang.String path)
           
 void put(java.io.InputStream src, java.lang.String dst)
           
 void put(java.io.InputStream src, java.lang.String dst, int mode)
           
 void put(java.io.InputStream src, java.lang.String dst, SftpProgressMonitor monitor)
           
 void put(java.io.InputStream src, java.lang.String dst, SftpProgressMonitor monitor, int mode)
           
 java.io.OutputStream put(java.lang.String dst)
           
 java.io.OutputStream put(java.lang.String dst, int mode)
           
 java.io.OutputStream put(java.lang.String dst, SftpProgressMonitor monitor, int mode)
           
 void put(java.lang.String src, java.lang.String dst)
           
 void put(java.lang.String src, java.lang.String dst, int mode)
           
 void put(java.lang.String src, java.lang.String dst, SftpProgressMonitor monitor)
           
 void put(java.lang.String src, java.lang.String dst, SftpProgressMonitor monitor, int mode)
           
 java.lang.String pwd()
           
 void quit()
           
 void rename(java.lang.String oldpath, java.lang.String newpath)
           
 void rm(java.lang.String path)
           
 void rmdir(java.lang.String path)
           
 void run()
           
 void setMtime(java.lang.String path, int mtime)
           
 void setStat(java.lang.String path, SftpATTRS attr)
           
 void start()
           
 SftpATTRS stat(java.lang.String path)
           
 void symlink(java.lang.String oldpath, java.lang.String newpath)
           
 java.lang.String version()
           
 
Methods inherited from class net.ssh.jsch.Channel
connect, disconnect, getExitStatus, getExtInputStream, getInputStream, getOutputStream, isEOF, sendSignal, setExtOutputStream, setInputStream, setOutputStream, setXForwarding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSH_FX_OK

public static final int SSH_FX_OK
See Also:
Constant Field Values

SSH_FX_EOF

public static final int SSH_FX_EOF
See Also:
Constant Field Values

SSH_FX_NO_SUCH_FILE

public static final int SSH_FX_NO_SUCH_FILE
See Also:
Constant Field Values

SSH_FX_PERMISSION_DENIED

public static final int SSH_FX_PERMISSION_DENIED
See Also:
Constant Field Values

SSH_FX_FAILURE

public static final int SSH_FX_FAILURE
See Also:
Constant Field Values

SSH_FX_BAD_MESSAGE

public static final int SSH_FX_BAD_MESSAGE
See Also:
Constant Field Values

SSH_FX_NO_CONNECTION

public static final int SSH_FX_NO_CONNECTION
See Also:
Constant Field Values

SSH_FX_CONNECTION_LOST

public static final int SSH_FX_CONNECTION_LOST
See Also:
Constant Field Values

SSH_FX_OP_UNSUPPORTED

public static final int SSH_FX_OP_UNSUPPORTED
See Also:
Constant Field Values

OVERWRITE

public static final int OVERWRITE
See Also:
Constant Field Values

RESUME

public static final int RESUME
See Also:
Constant Field Values

APPEND

public static final int APPEND
See Also:
Constant Field Values
Constructor Detail

ChannelSftp

public ChannelSftp()
Method Detail

init

public void init()

start

public void start()
           throws JSchException
Overrides:
start in class Channel
Throws:
JSchException

quit

public void quit()

exit

public void exit()

lcd

public void lcd(java.lang.String path)
         throws SftpException
Throws:
SftpException

cd

public void cd(java.lang.String path)
        throws SftpException
Throws:
SftpException

put

public void put(java.lang.String src,
                java.lang.String dst)
         throws SftpException
Throws:
SftpException

put

public void put(java.lang.String src,
                java.lang.String dst,
                int mode)
         throws SftpException
Throws:
SftpException

put

public void put(java.lang.String src,
                java.lang.String dst,
                SftpProgressMonitor monitor)
         throws SftpException
Throws:
SftpException

put

public void put(java.lang.String src,
                java.lang.String dst,
                SftpProgressMonitor monitor,
                int mode)
         throws SftpException
Throws:
SftpException

put

public void put(java.io.InputStream src,
                java.lang.String dst)
         throws SftpException
Throws:
SftpException

put

public void put(java.io.InputStream src,
                java.lang.String dst,
                int mode)
         throws SftpException
Throws:
SftpException

put

public void put(java.io.InputStream src,
                java.lang.String dst,
                SftpProgressMonitor monitor)
         throws SftpException
Throws:
SftpException

put

public void put(java.io.InputStream src,
                java.lang.String dst,
                SftpProgressMonitor monitor,
                int mode)
         throws SftpException
Throws:
SftpException

put

public java.io.OutputStream put(java.lang.String dst)
                         throws SftpException
Throws:
SftpException

put

public java.io.OutputStream put(java.lang.String dst,
                                int mode)
                         throws SftpException
Throws:
SftpException

put

public java.io.OutputStream put(java.lang.String dst,
                                SftpProgressMonitor monitor,
                                int mode)
                         throws SftpException
Throws:
SftpException

get

public void get(java.lang.String src,
                java.lang.String dst)
         throws SftpException
Throws:
SftpException

get

public void get(java.lang.String src,
                java.lang.String dst,
                SftpProgressMonitor monitor)
         throws SftpException
Throws:
SftpException

get

public void get(java.lang.String src,
                java.lang.String dst,
                SftpProgressMonitor monitor,
                int mode)
         throws SftpException
Throws:
SftpException

get

public void get(java.lang.String src,
                java.io.OutputStream dst)
         throws SftpException
Throws:
SftpException

get

public void get(java.lang.String src,
                java.io.OutputStream dst,
                SftpProgressMonitor monitor)
         throws SftpException
Throws:
SftpException

get

public java.io.InputStream get(java.lang.String src)
                        throws SftpException
Throws:
SftpException

get

public java.io.InputStream get(java.lang.String src,
                               int mode)
                        throws SftpException
Throws:
SftpException

get

public java.io.InputStream get(java.lang.String src,
                               SftpProgressMonitor monitor,
                               int mode)
                        throws SftpException
Throws:
SftpException

ls

public java.util.Vector ls(java.lang.String path)
                    throws SftpException
Throws:
SftpException

symlink

public void symlink(java.lang.String oldpath,
                    java.lang.String newpath)
             throws SftpException
Throws:
SftpException

rename

public void rename(java.lang.String oldpath,
                   java.lang.String newpath)
            throws SftpException
Throws:
SftpException

rm

public void rm(java.lang.String path)
        throws SftpException
Throws:
SftpException

chgrp

public void chgrp(int gid,
                  java.lang.String path)
           throws SftpException
Throws:
SftpException

chown

public void chown(int uid,
                  java.lang.String path)
           throws SftpException
Throws:
SftpException

chmod

public void chmod(int permissions,
                  java.lang.String path)
           throws SftpException
Throws:
SftpException

setMtime

public void setMtime(java.lang.String path,
                     int mtime)
              throws SftpException
Throws:
SftpException

rmdir

public void rmdir(java.lang.String path)
           throws SftpException
Throws:
SftpException

mkdir

public void mkdir(java.lang.String path)
           throws SftpException
Throws:
SftpException

stat

public SftpATTRS stat(java.lang.String path)
               throws SftpException
Throws:
SftpException

lstat

public SftpATTRS lstat(java.lang.String path)
                throws SftpException
Throws:
SftpException

setStat

public void setStat(java.lang.String path,
                    SftpATTRS attr)
             throws SftpException
Throws:
SftpException

pwd

public java.lang.String pwd()

lpwd

public java.lang.String lpwd()

version

public java.lang.String version()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class Channel