Try using a a different class that will return the HTTP header etc instead of just the contents.
Try your code with another website that returns an html page. Its possible that the site you are going ti does not return an html page.
When I read from that site I get this:
hdr> Date: Sat, 22 Sep 2012 12:22:41 GMT
hdr> Server: Apache
hdr> Cache-control: no-cache
hdr> Pragma: no-cache
hdr> Content-Type: text/html; charset=UTF-8
hdr> Expires: Sat, 22 Sep 2012 12:22:41 GMT
hdr> Set-Cookie: adbuin=1348316562-wmNq; path=/; expires=Tue, 20-Sep-2022 12:22:42 GMT
hdr> Vary: Accept-Encoding
hdr> Content-Encoding: gzip
hdr> Keep-Alive: timeout=4, max=50
hdr> Connection: Keep-Alive
hdr> Transfer-Encoding: chunked
Also posted at
http://www.java-forums.org/advanced-...sing-java.html