if (isPassiveMode()) { ftp.enterLocalPassiveMode(); }
    protected void connect(SocketClient client) throws Exception {        FTPClient ftp = (FTPClient) client;        if (config != null) {            ftp.configure(config);        }        super.connect(client);        int code = ftp.getReplyCode();        if (!FTPReply.isPositiveCompletion(code)) {            ftp.disconnect();            throw new ConnectionRefusedException(code);        }        if (!ftp.login(getUsername(), getPassword())) {            ftp.disconnect();            throw new ConnectionRefusedException(ftp.getReplyCode());        }        if (isBinaryMode()) {            ftp.setFileType(FTP.BINARY_FILE_TYPE);        }    }