• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I retrieve HTML pages?  RSS feed

 
NIKO.DEM.STLOUIS
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can anyone tell me the package or docs on how to retrieve HTML code from the internet?
Something like
get(http:www.yahoo.com); in perl.
The package name and a simple instruction would be great help.
Thank You,
Nikolas
 
NIKO.DEM.STLOUIS
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ok I think this will work,(below)
but what package is URL in?
The code I pinched this from used the class URL in a class extended from JFrame?
URL page;
try {
page = new URL(address);
getData(page);
} catch (MalformedURLException e) {
System.out.println("Bad URL: " + address);
}
}
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What you do with the stream is your own buisness.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!