org.erowid.sperowider
Class TextCssHandler

java.lang.Object
  extended byorg.erowid.sperowider.AHandler
      extended byorg.erowid.sperowider.TextCssHandler

public class TextCssHandler
extends AHandler

A Handler for dealing with CSS files, it replaces URLs inside url().

Version:
: $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/TextCssHandler.java,v 1.7 2005/01/15 23:26:15 gurustu Exp $
Author:
: $Author: gurustu $

Constructor Summary
TextCssHandler()
           
 
Method Summary
 void download(HttpURLConnection connection, String fileName, String originalURL)
          Downloads a CSS file and add found URLs (as indicated by url() in the CSS file) to the rectification queue.
 void rectify(String filename)
          Rectifies found URLs.
 void stampFile(Writer writer, URL url)
          CSS specific file stamper.
 
Methods inherited from class org.erowid.sperowider.AHandler
addURLToModel, getFileOutputStream, getReplaceableFilenameSuffixes, getRequiredFilenamePrefix, getRequiredFilenameSuffix, getSperowiderContext, setSperowiderContext, urlFoundInRectify, urlFoundInSpider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextCssHandler

public TextCssHandler()
Method Detail

download

public void download(HttpURLConnection connection,
                     String fileName,
                     String originalURL)
              throws IOException
Downloads a CSS file and add found URLs (as indicated by url() in the CSS file) to the rectification queue.

Specified by:
download in class AHandler
Throws:
IOException

rectify

public void rectify(String filename)
             throws IOException
Rectifies found URLs. See download(HttpURLConnection, String, String) for details on how URLs are found.

Specified by:
rectify in class AHandler
Throws:
IOException

stampFile

public void stampFile(Writer writer,
                      URL url)
               throws IOException
CSS specific file stamper.

Overrides:
stampFile in class AHandler
Throws:
IOException

spero logo small Sperowider is
© 2005 Erowid.org