commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: FTPClient hangs when downloading large files
Date Wed, 16 Feb 2011 01:43:33 GMT

In message <56FC94A3326C66468CE73D751286FF23496064@nawespscez02v.nadsuswe.nads.>, "Cysneros, Nelson A CIV SPAWARSYSCEN-PACIFIC, 56540" writes:
>I'm using the net-commons v2.2 FTPClient to download files from a server
>and it works great for files less then 250MB, but hangs with larger
>ftpClient.retrieveFile(ftpPath + "/" + files[i].getName(),fos); //Hangs here

Try using retrieveFileStream and writing your own stream-copying loop
(it should be only a few lines of code; but don't forget to call
completePendingCommand afterward).  If it works, then there's
something wrong with  If
you still experience a mysterious hang, then it's probably
not a Commons Net issue, but something to do with the network


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

View raw message