spider.util
Class Fetcher

java.lang.Object
  |
  +--spider.util.Fetcher

public class Fetcher
extends java.lang.Object

Fetches HTTP pages and various details from its response header

Author:
Gautam Pant

Field Summary
 int max_redirect
          maximum redirections possible
 int MAX_SIZE
          Max data to get (KB)
 int TIMEOUT
          timeout in seconds
 
Constructor Summary
Fetcher()
           
 
Method Summary
 Page fetch(java.lang.String pageURL, java.lang.String eMail)
          fetches a page and returns a Page type object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT

public int TIMEOUT
timeout in seconds


MAX_SIZE

public int MAX_SIZE
Max data to get (KB)


max_redirect

public int max_redirect
maximum redirections possible

Constructor Detail

Fetcher

public Fetcher()
Method Detail

fetch

public Page fetch(java.lang.String pageURL,
                  java.lang.String eMail)
fetches a page and returns a Page type object

Parameters:
eMail - - e-mail address to go with the HTTP request
Returns:
page - an object of the type Page
See Also:
Page