public class StringExtractor
extends java.lang.Object
StringBean to accumulate
the user visible text (what a browser would display) into a single string.| Constructor | Description |
|---|---|
StringExtractor(java.lang.String resource) |
Construct a StringExtractor to read from the given resource.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
extractStrings(boolean links) |
Extract the text from a page.
|
static void |
main(java.lang.String[] args) |
Mainline.
|
public StringExtractor(java.lang.String resource)
resource - Either a URL or a file name.public java.lang.String extractStrings(boolean links)
throws ParserException
links - if true include hyperlinks in output.ParserException - If a parse error occurs.public static void main(java.lang.String[] args)
args - The command line arguments.HTML Parser is an open source library released under LGPL.