Interface Client

  • All Known Subinterfaces:
    SecureClient

    public interface Client
    An FTP client.
    Since:
    1.0
    • Method Detail

      • configure

        void configure​(Configuration configuration)
        Configure the client with the configuration.
        Parameters:
        configuration - the configuration
        Since:
        1.0
      • connect

        void connect​(java.lang.String hostname)
              throws java.io.IOException
        Connect.
        Parameters:
        hostname - the hostname
        Throws:
        java.io.IOException - If the socket could not be opened. In most cases you will only want to catch IOException since SocketException is derived from it.
        Since:
        1.0
      • connect

        void connect​(java.lang.String hostname,
                     int port)
              throws java.io.IOException
        Connect.
        Parameters:
        hostname - the hostname
        port - the port
        Throws:
        java.io.IOException - If the socket could not be opened. In most cases you will only want to catch IOException since SocketException is derived from it.
        Since:
        1.0
      • disconnect

        void disconnect()
                 throws java.io.IOException
        Disconnect.
        Throws:
        java.io.IOException - If an error occurs while disconnecting.
        Since:
        1.0
      • send

        Response send​(Command command)
               throws java.io.IOException
        Send the command.
        Parameters:
        command - the command
        Returns:
        the response
        Throws:
        java.io.IOException - If an I/O error occurs while either sending the command or receiving the server reply.
        Since:
        1.0
      • send

        Response send​(Command command,
                      java.lang.String argument)
               throws java.io.IOException
        Send the command with an argument.
        Parameters:
        command - the command
        argument - the argument
        Returns:
        the response
        Throws:
        java.io.IOException - If an I/O error occurs while either sending the command or receiving the server reply.
        Since:
        1.0