commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Jacob <mja...@picturesafe.de>
Subject Re: Flush by net.ftp.FTPClient.retrieveFile(String, OutputStream)
Date Tue, 07 Sep 2004 06:43:01 GMT
Andrew,

yes I know about this possibility and this would be my workaround.
But if this flush is really neccessary I want to know, why.
Guess I want to stream direct to a servlet output stream. Flush
a servlet output stream should not occur.

I would like to hear from some of the experts about this or do I
have to post this in another list?

Andrew Ferguson wrote:
> 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 [mailto:mjacob@picturesafe.de] 
> Sent: 06 September 2004 15:57
> To: commons-user@jakarta.apache.org
> 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
> GERMANY
> 
> Fon: +49 511 - 856 20 54
> Fax: +49 511 - 856 20 10
> mailto:mjacob@picturesafe.de
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 

-- 
Marco Jacob
picturesafe GmbH
Software Development
Lüerstraße 3
D-30175 Hannover
GERMANY

Fon: +49 511 - 856 20 54
Fax: +49 511 - 856 20 10
mailto:mjacob@picturesafe.de


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message