code: public Ftp init(String host, int port, String user, String password, FtpMode mode) {
  		final FTPClient client = new FTPClient();
  		client.setControlEncoding(this.charset.toString());
  		try {
  			// 连接ftp服务器
  			client.connect(host, port);
  			// 登录ftp服务器
  			client.login(user, password);
  		} catch (IOException e) {
  			throw new FtpException(e);
  		}
  		final int replyCode = client.getReplyCode(); // 是否成功登录服务器
  		if (false == FTPReply.isPositiveCompletion(replyCode)) {
  			try {
  				client.disconnect();
  			} catch (IOException e) {
  				// ignore
  			}
  			throw new FtpException("Login failed for user [{}], reply code is: [{}]", user, replyCode);
  		}
  		this.client = client;
  		if (mode != null ) {
  			setMode(mode);
  		}
  		return this;
  	}
docs: 初始化连接
  
  @param host 域名或IP
  @param port 端口
  @param user 用户名
  @param password 密码
  @param mode 模式
  @return this