Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in Java FTP by (120 points)
Hallo,
in the API-Documentation I found the method "validateTransfer" of Class "FTPClient".
If I use the method after a put- oder get-Operation of a very large File (300 MB) nothing happends. The Programm hangs and will probaply never stop. I can't find an example in the documentation of how to use this method. Can somebody help me?

I use the method in the following manner:
.....
ftp.put(filetotransfer,targetfile);
ftp.validateTransfer();
.....

Is this okay?

Best Regards
Ingo[/code]

1 Answer

0 votes
by (162k points)
Don't use validateTransfer(). It is already used internally in get() & put() operations. It is only public for the very rare occasions that it may need to be used.

As you have found, calling it waits for a message from the server that indicates the transfer succeeded. Since the server has already sent this message (when validateTransfer() is called internally), your program will hang.

Hallo,
in the API-Documentation I found the method "validateTransfer" of Class "FTPClient".
If I use the method after a put- oder get-Operation of a very large File (300 MB) nothing happends. The Programm hangs and will probaply never stop. I can't find an example in the documentation of how to use this method. Can somebody help me?

I use the method in the following manner:
.....
ftp.put(filetotransfer,targetfile);
ftp.validateTransfer();
.....

Is this okay?

Best Regards
Ingo[/code]

Categories

...