Hi Mario, the trick sounds good. I thought, VFS could deal with that, but I ran in another problem when i quick fixed the issue in changing the connetion to start in FTP.ASCII_FILE_TYPE. first try was on a Linux box that fetched the data from a solaris box with ftp and then sends it to a Windows box. Nothing changed :-(. After thinking about I saw that there is no conversion between the two unix boxes and jcifs takes the data as it comes. No conversion is done. My solution was to deploy the program to a windows box and it worked. With your solution the program can also run on the linux box. Do you think that could be a feature for VFS to take care about conversion on heterogenous networks?
Mit freundlichen Grüßen Detlev Mörk Systementwickler Konradin Business GmbH Ernst-Mey-Str. 8 70771 Leinfelden-Echterdingen Tel.: +49 711/7594-504 Fax.: +49 711/7594-1504 Email: [EMAIL PROTECTED] -----Ursprüngliche Nachricht----- Von: Mario Ivankovits [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 7. November 2006 23:09 An: Jakarta Commons Developers List Betreff: Re: VFS FTP Problem with Text data Hi Moerk! > I tried to use vfs to get some textfiles from a unix host to a windows > network drive on a regular basis. > The problem is that the transfer program doesn't take care aobout the > different CR (0x0A-->0x0D 0x0A) commands between Unix and Windows I found > that the FTP Conection is alwyas started in FTP.BINARY_FILE_TYPE) that > doesn't support the conversion of CR in ftp. > Eventually it is possible to extend the FtpFileSystemConfigBuilder with such an option, though, another possibility is to use a BufferedReader and a PrintWriter to do the conversation on "client side", no? Simply readline the file and writeln it should do the trick too ... will work not only with ftp and in conjunction with an InputStreamReader you can deal with charset conversion at the same time ... Since the BufferedReader will use a (configureable) buffer to read the file there should be no huge performance penalty. What do you think? Ciao, Mario --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]