| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
contentTypes |
private java.util.HashMap |
handlers |
| Constructor and Description |
|---|
XMLHandler()
Creates new XMLHandler
|
XMLHandler(java.lang.Object[] hs) |
XMLHandler(XMLContentHandler[] hs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContentHandler(XMLContentHandler h) |
java.lang.String[] |
getContentTypes()
Returns an array of String containing the content-types this
ContentHandler can process. |
void |
handle(CrawlerAccess crawler,
java.io.InputStream in,
int depth,
java.net.URL page)
Processes the given page.
|
private java.util.HashMap handlers
private static final java.lang.String[] contentTypes
public XMLHandler()
public XMLHandler(XMLContentHandler[] hs)
public XMLHandler(java.lang.Object[] hs)
public void handle(CrawlerAccess crawler, java.io.InputStream in, int depth, java.net.URL page)
HandlerInputStream contains the data of an object that is
of the content-type this content handler accepts. May use the given
CrawlerAccess object to add further pages to the queue of the
WebCrawler that asked to process the page.handle in interface Handlercrawler - The call back object for the handler. Any objects built from
the content of the page can be sent to this.in - The InputStream of the page.depth - The depth remaining depth. When reporting another page to
the queue, the depth of that page should be set to this depth-1.page - The URL of the page.public java.lang.String[] getContentTypes()
HandlerContentHandler can process.getContentTypes in interface Handlerpublic void addContentHandler(XMLContentHandler h)
Copyright 2004-2015 Wandora Team