|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LinkExtractor
LinkExtractor is a general interface for classes which, when given an InputStream and Charset, can scan for Links and return them via an Iterator interface. Implementors may in fact complete all extraction on the first hasNext(), then trickle Links out from an internal collection, depending on whether the link-extraction technique used is amenable to incremental scanning. ROUGH DRAFT IN PROGRESS / incomplete... untested...
Method Summary | |
---|---|
Link |
nextLink()
Alternative to Iterator.next() which returns type Link. |
void |
reset()
Discard all state and release any used resources. |
void |
setup(UURI sourceandbase,
java.io.InputStream content,
java.nio.charset.Charset charset,
ExtractErrorListener listener)
Convenience version of above for common case where source and base are same. |
void |
setup(UURI source,
UURI base,
java.io.InputStream content,
java.nio.charset.Charset charset,
ExtractErrorListener listener)
Setup the LinkExtractor to operate on the given stream and charset, considering the given contextURI as the initial 'base' URI for resolving relative URIs. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
void setup(UURI source, UURI base, java.io.InputStream content, java.nio.charset.Charset charset, ExtractErrorListener listener)
source
- source URIbase
- base URI (usually the source URI) for URI derelativizingcontent
- input stream of content to scan for linkscharset
- Charset to consult to decode stream to characterslistener
- ExtractErrorListener to notify, rather than raising
exception through extraction loopvoid setup(UURI sourceandbase, java.io.InputStream content, java.nio.charset.Charset charset, ExtractErrorListener listener)
sourceandbase
- URI to use as source and base for derelativizingcontent
- input stream of content to scan for linkscharset
- Charset to consult to decode stream to characterslistener
- ExtractErrorListener to notify, rather than raising
exception through extraction loopLink nextLink()
void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |