If you're lazy, you can also just use a URL object. It has less functionality than URLConnection, but it's quick and does the job. I have a sample program (without proxy code) in my NUM (shameless plug) in the java section in case you're looking for sample code. Although there is plenty of good stuff at java.sun.com and elsewhere.
