Class SftpSubsystemClient


  • public class SftpSubsystemClient
    extends SubsystemChannel
    Version:
    $Revision: 1.38 $
    Author:
    $author$
    • Constructor Detail

      • SftpSubsystemClient

        public SftpSubsystemClient()
        Creates a new SftpSubsystemClient object.
    • Method Detail

      • getName

        public java.lang.String getName()
        Overrides:
        getName in class Channel
        Returns:
      • availableWindowSpace

        protected long availableWindowSpace()
        Returns:
      • maximumPacketSize

        protected long maximumPacketSize()
        Returns:
      • closeHandle

        protected void closeHandle​(byte[] handle)
                            throws java.io.IOException
        Parameters:
        handle -
        Throws:
        java.io.IOException
      • closeFile

        public void closeFile​(SftpFile file)
                       throws java.io.IOException
        Parameters:
        file -
        Throws:
        java.io.IOException
      • isValidHandle

        protected boolean isValidHandle​(byte[] handle)
        Parameters:
        handle -
        Returns:
      • listChildren

        public int listChildren​(SftpFile file,
                                java.util.List children)
                         throws java.io.IOException
        Parameters:
        file -
        children -
        Returns:
        Throws:
        java.io.IOException
      • makeDirectory

        public void makeDirectory​(java.lang.String path)
                           throws java.io.IOException
        Parameters:
        path -
        Throws:
        java.io.IOException
      • recurseMakeDirectory

        public void recurseMakeDirectory​(java.lang.String path)
                                  throws java.io.IOException
        Parameters:
        path -
        Throws:
        java.io.IOException
      • openDirectory

        public SftpFile openDirectory​(java.lang.String path)
                               throws java.io.IOException
        Parameters:
        path -
        Returns:
        Throws:
        java.io.IOException
      • getDefaultDirectory

        public java.lang.String getDefaultDirectory()
                                             throws java.io.IOException
        Returns:
        Throws:
        java.io.IOException
      • getAbsolutePath

        public java.lang.String getAbsolutePath​(java.lang.String path)
                                         throws java.io.IOException
        Parameters:
        path -
        Returns:
        Throws:
        java.io.IOException
      • getAbsolutePath

        public java.lang.String getAbsolutePath​(SftpFile file)
                                         throws java.io.IOException
        Parameters:
        file -
        Returns:
        Throws:
        java.io.IOException
      • openFile

        public SftpFile openFile​(java.lang.String filename,
                                 int flags)
                          throws java.io.IOException
        Parameters:
        filename -
        flags -
        Returns:
        Throws:
        java.io.IOException
      • openFile

        public SftpFile openFile​(java.lang.String absolutePath,
                                 int flags,
                                 FileAttributes attrs)
                          throws java.io.IOException
        Parameters:
        absolutePath -
        flags -
        attrs -
        Returns:
        Throws:
        java.io.IOException
      • getAttributes

        public FileAttributes getAttributes​(java.lang.String path)
                                     throws java.io.IOException
        Parameters:
        path -
        Returns:
        Throws:
        java.io.IOException
      • getAttributes

        public FileAttributes getAttributes​(SftpFile file)
                                     throws java.io.IOException
        Parameters:
        file -
        Returns:
        Throws:
        java.io.IOException
      • readFile

        protected int readFile​(byte[] handle,
                               UnsignedInteger64 offset,
                               byte[] output,
                               int off,
                               int len)
                        throws java.io.IOException
        Parameters:
        handle -
        offset -
        output -
        off -
        len -
        Returns:
        Throws:
        java.io.IOException
      • removeDirectory

        public void removeDirectory​(java.lang.String path)
                             throws java.io.IOException
        Parameters:
        path -
        Throws:
        java.io.IOException
      • removeFile

        public void removeFile​(java.lang.String filename)
                        throws java.io.IOException
        Parameters:
        filename -
        Throws:
        java.io.IOException
      • renameFile

        public void renameFile​(java.lang.String oldpath,
                               java.lang.String newpath)
                        throws java.io.IOException
        Parameters:
        oldpath -
        newpath -
        Throws:
        java.io.IOException
      • writeFile

        protected void writeFile​(byte[] handle,
                                 UnsignedInteger64 offset,
                                 byte[] data,
                                 int off,
                                 int len)
                          throws java.io.IOException
        Parameters:
        handle -
        offset -
        data -
        off -
        len -
        Throws:
        java.io.IOException
      • createSymbolicLink

        public void createSymbolicLink​(java.lang.String targetpath,
                                       java.lang.String linkpath)
                                throws java.io.IOException
        Parameters:
        targetpath -
        linkpath -
        Throws:
        java.io.IOException
      • getSymbolicLinkTarget

        public java.lang.String getSymbolicLinkTarget​(java.lang.String linkpath)
                                               throws java.io.IOException
        Parameters:
        linkpath -
        Returns:
        Throws:
        java.io.IOException
      • setAttributes

        public void setAttributes​(java.lang.String path,
                                  FileAttributes attrs)
                           throws java.io.IOException
        Parameters:
        path -
        attrs -
        Throws:
        java.io.IOException
      • setAttributes

        public void setAttributes​(SftpFile file,
                                  FileAttributes attrs)
                           throws java.io.IOException
        Parameters:
        file -
        attrs -
        Throws:
        java.io.IOException
      • changePermissions

        public void changePermissions​(SftpFile file,
                                      java.lang.String permissions)
                               throws java.io.IOException
        Parameters:
        file -
        permissions -
        Throws:
        java.io.IOException
      • changePermissions

        public void changePermissions​(SftpFile file,
                                      int permissions)
                               throws java.io.IOException
        Parameters:
        file -
        permissions -
        Throws:
        java.io.IOException
      • changePermissions

        public void changePermissions​(java.lang.String filename,
                                      int permissions)
                               throws java.io.IOException
        Parameters:
        filename -
        permissions -
        Throws:
        java.io.IOException
      • changePermissions

        public void changePermissions​(java.lang.String filename,
                                      java.lang.String permissions)
                               throws java.io.IOException
        Parameters:
        filename -
        permissions -
        Throws:
        java.io.IOException
      • initialize

        public boolean initialize()
                           throws java.io.IOException
        Returns:
        Throws:
        java.io.IOException