org.erowid.sperowider
Class TextHtmlHandler
java.lang.Object
org.erowid.sperowider.AHandler
org.erowid.sperowider.TextHtmlHandler
- public class TextHtmlHandler
- extends AHandler
This class does the downloading and spidering of HTML files.
- Version:
- : $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/TextHtmlHandler.java,v 1.29 2005/05/21 08:51:34 gurustu Exp $
- Author:
- : $Author: gurustu $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextHtmlHandler
public TextHtmlHandler()
rectify
public void rectify(String filename)
throws IOException
- Replaces URLs found in text/html files with local file references. This class
relies on
HTMLShredder
and URLMongler
to find URLs.
- Specified by:
rectify
in class AHandler
- Throws:
IOException
download
public void download(HttpURLConnection connection,
String fileName,
String originalURL)
throws IOException
- Downloads files, and adds found URLs to the rectification queue. This class
relies on
HTMLShredder
and URLMongler
to find URLs.
- Specified by:
download
in class AHandler
- Throws:
IOException
getRequiredFilenameSuffix
public String getRequiredFilenameSuffix()
- All downloaded HTML files should end with ".html"
- Overrides:
getRequiredFilenameSuffix
in class AHandler
getReplaceableFilenameSuffixes
public String[] getReplaceableFilenameSuffixes()
- Returns ".shtml", ".php", ".asp", ".jsp", and ".do".
- Overrides:
getReplaceableFilenameSuffixes
in class AHandler