I'm trying to upload a file via FTP, the excel file apparently is copying it correctly, but when I open it, it says it's corrupt.
Any ideas ??
public static void enviarArchivoFTP(String localFile, String hostFile) throws FileNotFoundException, IOException{
//fis = new FileInputStream(localFile);
BufferedInputStream buffIn = new BufferedInputStream(new FileInputStream(localFile));
ftp.setFileType(FTP.BINARY_FILE_TYPE);
ftp.enterLocalPassiveMode();
if(ftp.storeFile(hostFile,buffIn))
System.out.println("Envio correcto");
else
System.out.println("Error Envio");
//fis.close();
buffIn.close();
}