ftp下载文件

ftp读取多个文件时,必须读取一次,登录一次。

下面是

inputStream = this.ftpClient.retrieveFileStream(name);

retrieveFileStream方法注释。

 The InputStream itself will take care of closing the parent data connection socket upon being closed.

 

 

for (String name : names) {

ftpLogin();

inputStream = this.ftpClient.retrieveFileStream(name);

}

你可能感兴趣的:(ftp)