examples

Class FTPToSFTPProxy

    • Constructor Detail

      • FTPToSFTPProxy

        public FTPToSFTPProxy(java.io.InputStream ftpInput,
                      java.io.OutputStream ftpOutput)
        Construct an FTP to SFTP proxy which uses the given streams to communicate with an FTP client.
        Parameters:
        ftpInput - input stream from ftp client
        ftpOutput - output stream to ftp client
    • Method Detail

      • login

        public boolean login(java.lang.String user,
                    java.lang.String pass)
        Connect and log in to the SSH server
        Specified by:
        login in interface FTPServerEventHandler
        Overrides:
        login in class SSH2FTPOverSFTP
        Parameters:
        user - username to log in as
        pass - password to authenticate with
        Returns:
        true if the login was successful.
      • main

        public static void main(java.lang.String[] argv)
        Run the application