commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: Is FTPClient.retrieveFile thread safe?
Date Sun, 06 Apr 2008 02:21:13 GMT

In message <007101c895a4$bd365990$37a30cb0$>, "Cory Burkhardt" writes:
>sections."  Since the retrieveFile method blocks until the download is
>complete, does that mean I cannot use this method from multiple threads and
>I am required to use the retrieveFileStream method to write the file
>manually instead?

You can't download multiple files concurrently over a single FTP connection,
so if you want to download files concurrently from multiple threads, you're
going to have to use a separate FTPClient instance/FTP connection per thread.
FTP is a serial (one file at a time) protocol.


o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o o-o-o-o-o-o-o-o-o-o-o-o-o-o
                    Igfip                      o    s a v a r e s e
The strategic alternative for online games(tm).o   software research

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

View raw message