我正在尝试通过 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();