---On Fri, 23 Apr 1999 14:22:47 +0200,  Willi Richert said

> Curious problem.
> For an ftp-client I have a BufferedInputStream retrieved from the
> ftp-server (proftpd). I read from it and write the File through
> BufferedOutputStream(new FileOutputStream()) to Disk. Now, the file
> written to disk is some K greater than the file read of:
> 
> File on my virtual FTP-Server:
>  #> l big-file.zip
> -r-xr-xr-x   1 root     root     15598221 Mär 29 20:02 big-file.zip*
> 
> # > l /tmp/even-bigger-file.zip
> -rw-r--r--   1 willi    users    15655752 Apr 23 14:06
> /tmp/even-bigger-file.zip
> 

    Sounds like you are transferring the file in ascii mode. The server is
supposed to expand the local EOL character to <CR><LF> and the client is
supposed to convert the <CR><LF> to the local convention.

    Looks like the server is adding them and your code doesn't show you
stripping them off. You need to do a binary transfer. See RFC0959 for details.

--re: BufferedInputStream gives more byte than the original file has

                                 Chris
#include <stddisclaimer.h>

Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International

[EMAIL PROTECTED]

Computers are like air-conditioners:
    They stop working properly when you open windows.

Linux: The OS for people with an IQ over 98





----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to