I am using org.apache.commons.net.ftp.FTPClient.retriveFile(String,OutputStream)
to download file from FTP to windows machine. When I download one text file it's format is missing. When I open downloaded file in notepad it's not looking like original one. Please find the difference in attached screenshots. Please find my below code and please anyone let me know solution for the same.
FileOutputStream fos = new FileOutputStream(tempPath+File.separator+files[i].getName());
this.ftpClient.retrieveFile(files[i].getName(), fos);
fos.close();