I'm trying to download a pdf files from FTPServer. I was able to download the file but when i'm trying to open the same, i'm unable to see the contents.
FYI-If the PDF file size is 735kb, i'm able to see the contents. But if the file size is 18kb, i'm unable to see the contents of the PDF File.
I'm pasting the code which i was using to download,
//The following stmt, gets the file contents in the form of byte array.
byte  aFileContent = ftpClient.downloadFile("csfbsda.pdf");
InputStream is = new ByteArrayInputStream(aFileContent);
BufferedInputStream in = new BufferedInputStream(is);
FileOutputStream file = new FileOutputStream("C:/csfbsda.pdf");
BufferedOutputStream out = new BufferedOutputStream(file);