I am using appache commons method to download some files from my FTP server and I am having some issues with the zip file being corrupted. I am able to download the file and place the file in the correct folder but when I open it there are files missing and it claims it's corrupted, if I try downloading with normal .txt files it works fine.
public boolean downloadFiles(String folder, String file) throws Exception
{
File output = new File(folder + "\\" + file);
System.out.println(output);
FileOutputStream out = new FileOutputStream(output);
client.retrieveFile(file, out);
out.close();
if(output.exists())
return true;
else
return false;
}