org.jasen.net
Class StandardURLReader

java.lang.Object
  extended byorg.jasen.net.StandardURLReader
All Implemented Interfaces:
URLReader

public class StandardURLReader
extends Object
implements URLReader

Extracts the content from a remote web server for the purposes of analysis.

Author:
Jason Polites

Constructor Summary
StandardURLReader()
           
 
Method Summary
 int getReadBufferSize()
           
 long getReadTimeout()
           
 String readURL(URL url)
          Extracts the raw HTML from the given web url
 void setReadBufferSize(int readBufferSize)
           
 void setReadTimeout(long readTimeout)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardURLReader

public StandardURLReader()
Method Detail

readURL

public String readURL(URL url)
               throws JasenException
Description copied from interface: URLReader
Extracts the raw HTML from the given web url

Specified by:
readURL in interface URLReader
Parameters:
url -
Returns:
The [HTML] content located at the given URL
Throws:
JasenException

getReadBufferSize

public int getReadBufferSize()
Returns:
Returns the size (in bytes) of the buffer used when reading url data.

setReadBufferSize

public void setReadBufferSize(int readBufferSize)
Parameters:
readBufferSize - The size (in bytes) of the buffer used when reading url data.

getReadTimeout

public long getReadTimeout()
Returns:
Returns the time (in milliseconds) to wait for data from the url stream until reading is abnormally aborted.

setReadTimeout

public void setReadTimeout(long readTimeout)
Parameters:
readTimeout - The time (in milliseconds) to wait for data from the url stream until reading is abnormally aborted.