|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.reader.StringExtractor
public class StringExtractor
Extracts lines of text and links from a URL and passes them to a DocumentProcessor.
Field Summary | |
---|---|
private org.htmlparser.beans.StringBean |
bean
|
private static java.lang.String |
EXCEPTION_STRING
|
Constructor Summary | |
---|---|
StringExtractor()
Creates a StringExtractor that uses the default StringBean to extract the text. |
|
StringExtractor(org.htmlparser.beans.StringBean bean)
Creates a StringExtractor that uses the specified bean to extract the text. |
Method Summary | |
---|---|
private void |
processStrings(DocumentProcessor processor)
|
void |
run(java.lang.String url,
DocumentProcessor processor)
Runs this StringExtractor over the specified url. |
void |
run(java.lang.String url,
java.lang.String referer,
DocumentProcessor processor)
Runs this StringExtractor over the specified url. |
void |
run(java.net.URLConnection conn,
DocumentProcessor processor)
Runs this StringExtractor over the specified url connection. |
void |
runWithManualFetch(java.lang.String url,
DocumentProcessor processor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String EXCEPTION_STRING
private org.htmlparser.beans.StringBean bean
Constructor Detail |
---|
public StringExtractor(org.htmlparser.beans.StringBean bean)
bean
- the bean to use.public StringExtractor()
Method Detail |
---|
public void run(java.lang.String url, java.lang.String referer, DocumentProcessor processor) throws java.io.IOException
url
- the url to run onreferer
- a link to set in the http REFERER header. This is optional and can
be an empty stringprocessor
- the processor to pass the extracted strings to
java.io.IOException
- if there is an error extracting the strings.public void run(java.net.URLConnection conn, DocumentProcessor processor) throws java.io.IOException
conn
- the url connection to run onprocessor
- the processor to pass the extracted strings to
java.io.IOException
- if there is an error extracting the strings.public void run(java.lang.String url, DocumentProcessor processor) throws java.io.IOException
url
- the url to run onprocessor
- the processor to pass the extracted strings to
java.io.IOException
- if there is an error extracting the strings.public void runWithManualFetch(java.lang.String url, DocumentProcessor processor) throws java.io.IOException
java.io.IOException
private void processStrings(DocumentProcessor processor) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |