Ahmed Kotb wrote:no File is not corrupted , i tried to extract it with winrare and it is extracted successfully
WinRar supports many many different formats -- including the copyrighted rar format. If the cause is because you are using a format that isn't support, I don't know what to tell you.
Henry Wong wrote:
WinRar supports many many different formats -- including the copyrighted rar format. If the cause is because you are using a format that isn't support, I don't know what to tell you.
File Format is ZIP , and after extraction i try to rename it as above in the code.
I used this method with Small files and it worked good , but when dealing with large files it throws that exception.
when downloading that file with FileZilla the extraction method working well, so i guess that the problem in the method which i am using for downloading(retrieveFile(String remoteFileName, FileOutputStream fos)) ...
I am using Apache Library (commons-net.jar), is there any problems for that library ?
Ah yes, the dreaded ASCII / binary download problem. Downloading a binary file (like ZIP files) as if they were text will corrupt the file. That's what happened to you. When using binary or automatic for transferring you won't have this problem.