Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.8k views
in Java FTP by (120 points)
need to validate a transfer's success. Since the
Code:
put()
methods don't return anything.


Actully, there is no space on the server and we trying to download the file from ftp server. In this case, "put" command should return io exception but it is giving success and file was created on the server as zero kb.

Thanks in advance.

1 Answer

0 votes
by (162k points)
put() methods throw an exception if there is a problem - based on the server's return code. So the server is saying the transfer is successful and not giving any indication of failure.

what you could do is use size() after the transfer to check that the size is identical to that of the local file (this is only the case if you are transfering in binary mode).

Categories

...