Class SimpleFtpClient

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleFtpClient()  
    • Method Summary

      All Methods Instance Methods Concrete 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • SimpleFtpClient

        public SimpleFtpClient()
    • Method Detail

      • connect

        public 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
        Description copied from interface: FtpClientInterface
        Initialization of a file transfer client, and connection to the given server
        Specified by:
        connect in interface FtpClientInterface
        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
      • list

        public java.util.List<java.lang.String> list​(java.lang.String path)
                                              throws java.io.IOException
        Specified by:
        list in interface FtpClientInterface
        Throws:
        java.io.IOException
      • setBinaryTransfer

        public void setBinaryTransfer​(boolean isBinary)
                               throws java.io.IOException
        Specified by:
        setBinaryTransfer in interface FtpClientInterface
        Throws:
        java.io.IOException
      • copy

        public void copy​(java.lang.String path,
                         java.lang.String fileName,
                         java.io.InputStream file)
                  throws java.io.IOException
        Description copied from interface: FtpClientInterface
        Copy of the give file to the connected server into the path.
        Specified by:
        copy in interface FtpClientInterface
        Parameters:
        path - path to copy the file to
        fileName - name of the copied file
        file - data to copy
        Throws:
        java.io.IOException