This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The code below works, pulls down a file, rips out the http response, and closes the channels properly.
HOWEVER, my cpu usage is 100% max while the code runs. This code is also in a thread spawned by a download manager. I have an AMD64 3700 with a gig of ram and running jdk1.5_05, so I don't think processing power is the issue.
This can't be normal, or is it? Any tips or insight into why this is happening?
100% CPU usage is a good thing. It means that something is happening as fast as possible, without needing to wait for disk or RAM or network or video or mouse or keyboard. If you search the "Performance" forum for the phrase "100% CPU Usage" you'll probably find this discussed a dozen times.