I\'m trying to use Apache Commons Net for FTP file transfers.
Problem is files are intermittently arriving at the server corrupt. By \'corrupt\' I mean that WinRAR t
Commons FTP defaults to Ascii file types. You want to set it to Binary when dealing with binary data like a ZIP file.
From http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html
The default settings for FTPClient are for it to use FTP.ASCII_FILE_TYPE , FTP.NON_PRINT_TEXT_FORMAT , FTP.STREAM_TRANSFER_MODE , and FTP.FILE_STRUCTURE . The only file types directly supported are FTP.ASCII_FILE_TYPE and FTP.BINARY_FILE_TYPE .
You want to do setFileType(FTP.BINARY_FILE_TYPE) before you send the file.