[FTP] Retrieve Visio file

classic Classic list List threaded Threaded
1 message Options
lmk
Reply | Threaded
Open this post in threaded view
|

[FTP] Retrieve Visio file

lmk
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi all,

Im using commons ftp api to send and retrieve file from an FTP Server, I  have a problem with visio file, the file is well transfered to the ftp server and I can open it, but, when I try to retrieve the file data  the file seems to be corrupted.
Im using:

File file = new File(ftpFileName);
FileOutputStream fos = new FileOutputStream(file);
ftp.retrieveFile(ftpFileName, fos);  


I set the filte type befor saving to FTPClient.BINARY_FILE_TYPE, when I retrieve the file, it's tye is the  ASCII, the ftp file size is 111104 and when I retrieve  the file the size changes to 111101.

the issue occurs on ubunto server, it works better on my local windows XP server.

do you have any advise on this issue.?
thanks..