public class HTMLParser extends Object
| Constructor and Description |
|---|
HTMLParser(boolean clinks)
Constructor for the HTMLParser object.
|
HTMLParser(boolean clinks,
boolean ilinks)
Constructor for the HTMLParser object.
|
| Modifier and Type | Method and Description |
|---|---|
URI |
getBaseURL()
Return the base URL.
|
ArrayList<Anchor> |
getImageLinks()
Return a Vector of the links obtained by the Handler.
|
ArrayList<Anchor> |
getLinks()
Return a Vector of the links obtained by the Handler.
|
HashMap<String,String> |
getMeta()
Return a Hashtable containing the metadata obtained by the Handler.
|
CharStream |
getReader(Reader i,
String baseURL,
EventEncoder encoder)
Return a StringReader that will use the given input stream and read
from the given URL.
|
String |
getSummary()
Return the summary.
|
String |
getTitle()
Return the title.
|
static void |
main(String[] args)
Entry point to the HTMLParser application.
|
public HTMLParser(boolean clinks)
clinks - if set to true the object will collect
links from the documentgetLinks()public HTMLParser(boolean clinks,
boolean ilinks)
clinks - if set to true the object will collect
links from the documentilinks - if set to true the object will collect
img-src links from the documentpublic URI getBaseURL()
public ArrayList<Anchor> getLinks()
public ArrayList<Anchor> getImageLinks()
public HashMap<String,String> getMeta()
public CharStream getReader(Reader i, String baseURL, EventEncoder encoder) throws IOException
i - the input streambaseURL - where to read fromIOException - if an I/O error occurspublic String getSummary()
public String getTitle()
public static void main(String[] args)
args - the path to the file to parseCopyright © 2016 Egothor. All Rights Reserved.