Reputation: 75
I'm trying to download files through FTPS, the result file is always empty. (I'm using 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();
Upvotes: 1
Views: 293