I seem to be uploading corrupt jar files to a remote server using Apache's FTPClient 3.0.1. I am also setting the file and file transfer type to binary.
FTPClient ftp = new FTPClient();
FileInputStream fis = new FileInputStream("filename");
ftp.setFileTransferMode(org.apache.commons.net.ftp.FTP.BINARY_FILE_TYPE);
ftp.setFileType(FTPClient.BINARY_FILE_TYPE);
ftp.storeFile(fis);
fis.close();
ftp.logout();
ftp.disconnect();
any help would be appreciated!
Jason