Java Reference
In-Depth Information
/**
* Called when the spider is about to process a NON-HTML
* URL.
*
* @param url
* The URL that the spider found.
* @param stream
* An InputStream to read the page contents from.
* @throws IOException
* Thrown if an IO error occurs while processing
* the page.
*/
public void spiderProcessURL(URL url, InputStream stream) {
}
/**
* Called when the spider is ready to process an HTML
* URL.
*
* @param url
* The URL that the spider is about to process.
* @param parse
* An object that will allow you you to parse the
* HTML on this page.
* @throws IOException
* Thrown if an IO error occurs while processing
* the page.
*/
public void spiderProcessURL(URL url, SpiderParseHTML parse) {
try {
parse.readAll();
} catch (IOException e) {
logger.log(Level.INFO, "Error reading page:"
+ url.toString());
}
}
/**
* Called when the spider tries to process a URL but gets
* an error.
*
* @param url
* The URL that generated an error.
*/
public void spiderURLError(URL url) {
URL source;
Search WWH ::




Custom Search