All Packages Class Hierarchy This Package Previous Next Index
Class Acme.HtmlEditScanner
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.FilterInputStream
|
+----Acme.HtmlEditScanner
- public class HtmlEditScanner
- extends FilterInputStream
- implements HtmlObserver
An HTML scanner with editing.
This is like HtmlScanner but it lets you make changes to the URLs in
the HTML stream you are scanning. The regular scanner class lets
you define callbacks that get called with the URLs; in this version,
you can return substitute URLs from the callbacks, and they get
inserted into the stream in place of the old URLs.
Fetch the software.
Fetch the entire Acme package.
-
HtmlEditScanner(HtmlScanner, HtmlEditObserver)
- Constructor with a pre-made HtmlScanner.
-
HtmlEditScanner(HtmlScanner, HtmlEditObserver, Object)
- Constructor with a pre-made HtmlScanner, with clientData.
-
HtmlEditScanner(InputStream, URL, HtmlEditObserver)
- Constructor.
-
HtmlEditScanner(InputStream, URL, HtmlEditObserver, Object)
- Constructor with clientData.
-
addObserver(HtmlEditObserver)
- Add an extra observer to this editor.
-
addObserver(HtmlEditObserver, Object)
- Add an extra observer to this editor.
-
gotAHREF(String, URL, Object)
- Callback from HtmlScanner.
-
gotAREAHREF(String, URL, Object)
- Callback from HtmlScanner.
-
gotBASEHREF(String, URL, Object)
- Callback from HtmlScanner.
-
gotBODYBACKGROUND(String, URL, Object)
- Callback from HtmlScanner.
-
gotFRAMESRC(String, URL, Object)
- Callback from HtmlScanner.
-
gotIMGSRC(String, URL, Object)
- Callback from HtmlScanner.
-
gotLINKHREF(String, URL, Object)
- Callback from HtmlScanner.
-
read()
- Override to make sure this goes through the above
read( byte[], int, int) method.
-
read(byte[], int, int)
- Special version of read() that's careful about URLs split across
buffer-loads.
HtmlEditScanner
public HtmlEditScanner(InputStream s,
URL thisUrl,
HtmlEditObserver observer)
- Constructor.
If the client is not interested in getting called back with URLs,
observer can be null (but then there's not much point in
using this class).
HtmlEditScanner
public HtmlEditScanner(InputStream s,
URL thisUrl,
HtmlEditObserver observer,
Object clientData)
- Constructor with clientData.
If the client is not interested in getting called back with URLs,
observer can be null (but then there's not much point in
using this class).
HtmlEditScanner
public HtmlEditScanner(HtmlScanner scanner,
HtmlEditObserver observer)
- Constructor with a pre-made HtmlScanner.
If the client is not interested in getting called back with URLs,
observer can be null (but then there's not much point in
using this class).
HtmlEditScanner
public HtmlEditScanner(HtmlScanner scanner,
HtmlEditObserver observer,
Object clientData)
- Constructor with a pre-made HtmlScanner, with clientData.
If the client is not interested in getting called back with URLs,
observer can be null (but then there's not much point in
using this class).
addObserver
public void addObserver(HtmlEditObserver observer)
- Add an extra observer to this editor. Multiple observers get called
in the order they were added.
addObserver
public void addObserver(HtmlEditObserver observer,
Object clientData)
- Add an extra observer to this editor. Multiple observers get called
in the order they were added.
read
public int read(byte b[],
int off,
int len) throws IOException
- Special version of read() that's careful about URLs split across
buffer-loads.
- Overrides:
- read in class FilterInputStream
read
public int read() throws IOException
- Override to make sure this goes through the above
read( byte[], int, int) method.
- Overrides:
- read in class FilterInputStream
gotAHREF
public void gotAHREF(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotIMGSRC
public void gotIMGSRC(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotFRAMESRC
public void gotFRAMESRC(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotBASEHREF
public void gotBASEHREF(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotAREAHREF
public void gotAREAHREF(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotLINKHREF
public void gotLINKHREF(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
gotBODYBACKGROUND
public void gotBODYBACKGROUND(String urlStr,
URL contextUrl,
Object junk)
- Callback from HtmlScanner.
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs