1

我正在尝试通过 FTPS 下载文件,结果文件始终为空。(我正在使用 org.apache.commons.net.ftp.FTPClient)

FTPSClient client = new FTPSClient( );
OutputStream outStream;

client.connect("ip");
client.login("user", "pass");

String remoteFile = "filePath";
outStream = new FileOutputStream( "destinationFile" );
client.retrieveFile(remoteFile, outStream);
outStream.flush();
4

1 回答 1

1

JSch Java 库是解决您问题的好选择

于 2012-11-21T05:47:07.867 回答