de.dbsystems.simplescrape
Class HTTPHelper

java.lang.Object
  extended by de.dbsystems.simplescrape.HTTPHelper

public class HTTPHelper
extends java.lang.Object

Class for holding HTML-comments. These are all texts surrounded by

Since:
04.04.2007
Author:
Ronald Bieber, DB Systems GmbH

Constructor Summary
HTTPHelper()
           
 
Method Summary
 java.net.Proxy getProxy()
           
 Scraper getWebpageForScraping(java.lang.String urlString)
          Acquires the content of a webpage.
 Scraper getWebpageForScraping(java.lang.String urlString, java.lang.String postData, java.lang.String referer)
          Acquires the content of a webpage with POST-data.
 void setProxy(java.net.Proxy proxy)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPHelper

public HTTPHelper()
Method Detail

getProxy

public java.net.Proxy getProxy()

setProxy

public void setProxy(java.net.Proxy proxy)

getWebpageForScraping

public Scraper getWebpageForScraping(java.lang.String urlString)
Acquires the content of a webpage.

Parameters:
urlString - The URL to be retrieved from.
Returns:
The content as a tokenized Scraper, or null, if an error occurred.

getWebpageForScraping

public Scraper getWebpageForScraping(java.lang.String urlString,
                                     java.lang.String postData,
                                     java.lang.String referer)
Acquires the content of a webpage with POST-data. The code is specific to the Reiseauskunft, as a referer is expected while cookies are not processed at all.

Parameters:
urlString - The URL to retrieve from.
postData - The complete (and encoded) POST-data
referer - The referer to be transmitted (HTTP-Header)
Returns:
The content as a tokenized Scraper, or null, if an error occurred.