Interface FtpClientInterface

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void closeConnection()
      Close opened connection
      void connect​(java.lang.String hostname, java.lang.String username, java.lang.String password, java.lang.Long port, java.lang.Long timeout)
      Initialization of a file transfer client, and connection to the given server
      void copy​(java.lang.String path, java.lang.String fileName, java.io.InputStream file)
      Copy of the give file to the connected server into the path.
      java.util.List<java.lang.String> list​(java.lang.String path)  
      void setBinaryTransfer​(boolean isBinary)  
      void setPassiveMode​(boolean isPassive)  
    • Method Detail

      • connect

        void connect​(java.lang.String hostname,
                     java.lang.String username,
                     java.lang.String password,
                     java.lang.Long port,
                     java.lang.Long timeout)
              throws java.io.IOException,
                     GeneralException
        Initialization of a file transfer client, and connection to the given server
        Parameters:
        hostname - hostname to connect to
        username - username to login with
        password - password to login with
        port - port to connect to the server, optional
        timeout - timeout for connection process, optional
        Throws:
        java.io.IOException
        GeneralException
      • copy

        void copy​(java.lang.String path,
                  java.lang.String fileName,
                  java.io.InputStream file)
           throws java.io.IOException
        Copy of the give file to the connected server into the path.
        Parameters:
        path - path to copy the file to
        fileName - name of the copied file
        file - data to copy
        Throws:
        java.io.IOException
      • list

        java.util.List<java.lang.String> list​(java.lang.String path)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • setBinaryTransfer

        void setBinaryTransfer​(boolean isBinary)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • setPassiveMode

        void setPassiveMode​(boolean isPassive)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • closeConnection

        void closeConnection()
                      throws java.io.IOException
        Close opened connection
        Throws:
        java.io.IOException