I was having the following issue using the standard Java package so I was
recommended to try out HttpClient and I still have the same issue. Perhaps
someone can shed some light on the situation for me?
Let's say I want to download many files that happen to _not exist_ on the
server. For example:
http://www.example.com/notThere1.txt
http://www.example.com/notThere2.txt
http://www.example.com/notThere3.txt
...
http://www.example.com/notThere5000.txt
What ends up happening is that after notThere1.txt is found to be not there,
attempting to download notThere2.txt actually uses a different local port. And
eventually, I run out of ports because all of the ones I had been using are
stuck in the TIME_WAIT state.
I am using Windows XP.
The code I have written essentially looks like the sample code in the
tutorial. To be more specific, the code is exactly the same if the file
doesn't exist (which is the only case I'm testing), and different for when it
does exist.
I appreciate any help. Thanks!
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.