commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Ferguson" <>
Subject RE: Flush by net.ftp.FTPClient.retrieveFile(String, OutputStream)
Date Mon, 06 Sep 2004 15:18:44 GMT
quick suggestion - is it possible to use FTPClient.retrieveStream instead? if I understand,
you'd have to write the glue code but I'd guess there was a reason for calling flush so often

-----Original Message-----
From: Marco Jacob [] 
Sent: 06 September 2004 15:57
Subject: Flush by net.ftp.FTPClient.retrieveFile(String, OutputStream)

I am new to this list.
Today I switched to the new commons-net.jar libraries because I found out that

   FTPClient.retrieveFile(String, OutputStream)

flushes the OutputStream after each time it calls write(byte[], int, int).
Unfortunately I habe an RMIOutputStream that transfers the data to a client.
The flush call makes RMIOutputStream write every 1024 over RMI while the buffer to transfer
is 1MB.

I think, FTPClient.retrieveFile(String, OutputStream) should never flush or close() the given
OutputStream. The calling method should do this.

However, can this be changed in the next release?
Marco Jacob
picturesafe GmbH
Software Development
Lüerstraße 3
D-30175 Hannover

Fon: +49 511 - 856 20 54
Fax: +49 511 - 856 20 10

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message