Class HttpDownloader

Class HttpDownloader

java.lang.Object
   |
   +----HttpDownloader

class HttpDownloader
extends Object
This class downloads html pages via http protocol. It downloads html text only. No rendering of html is done. It assumes your machine is connected to the internet either directly or via slip or ppp. The html pages can be saved to a file, displayed to the screen or placed in string. Don't know how large a file can fit into a string.

Constructor Index

 o HttpDownloader(String)

Method Index

 o main(String[])
Examples of using this class
 o toFile(String)
Retrieves a web page and places the html in a file.
 o toScreen()
Retrieves a web page and displays the html on standard out
 o toString()
Retrieves a web page and places the html in a string

Constructors

 o HttpDownloader
  public HttpDownloader(String absoluteURL)

Methods

 o main
  public static void main(String args[])
Examples of using this class
 o toString
  public String toString()
Retrieves a web page and places the html in a string
Returns:
a string containing the html of the web page
Overrides:
toString in class Object
 o toScreen
  public void toScreen()
Retrieves a web page and displays the html on standard out
 o toFile
  public void toFile(String fileName)
Retrieves a web page and places the html in a file. Erases previous contents of file.
Parameters:
fileName - name of file used to store html of the web page