0

My question is regarding FTPClient. I need detailed reply statistics. When I use getReplyString() I get only part of the information. For example: My code is

FTPClient ftp = new FTPClient();
//some code here
ftp.storeFile(hostDir + fileName, input);
System.out.println(ftp.getReplyString());// This prints "226 Transfer OK" when it is sucessful

But I need to get the statistics which we get it when we do ftp manually using command prompt as in

226 Transfer OK
ftp: 50 bytes sent in 0.09Seconds 0.55Kbytes/sec.

How to get these stats using FTPClient? Any idea or link to refer to?

shriguru nayak
  • 310
  • 1
  • 3
  • 21

1 Answers1

0

You can make this manually, recording the start and end of the process. After, just some calculations, like: fileLength / timeEnd - timeStart. You should work a little more in these calculations.

williamlopes
  • 406
  • 6
  • 16