It's not a secret anymore!
The moose likes Sockets and Internet Protocols and the fly likes downloadWebpage() problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "downloadWebpage() problem" Watch "downloadWebpage() problem" New topic

downloadWebpage() problem

Michael Tan

Joined: Jul 07, 2009
Posts: 6
im trying to build a custom webpage + RSS reader from scratch.

the method shown below works for the most part. but it will always get this Exception " Unexpected end of file from server" whenever a RSS is from "".

but, when i open a RSS using RssReader, it works. so, what am i missing here?

Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
It may not explain this problem, but note that the code has a lingering bug waiting to happen: Don't println to a Socket (or, in this case, readLine).
I agree. Here's the link:
subject: downloadWebpage() problem
jQuery in Action, 3rd edition