org.wings.resource
Class CssUrlFilterInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.BufferedInputStream
              extended by org.wings.resource.CssUrlFilterInputStream
All Implemented Interfaces:
Closeable

public class CssUrlFilterInputStream
extends BufferedInputStream

filters an input stream of a css file for occurences of "url([classPath])". These image classpaths are then externalized and replaced in the resulting InputStream. This gives us the possibility to load css files and their included images via the classpath, so no external files are needed. If the image is not found at the classpath provided, the occurence is not altered.

Version:
$$
Author:
ole

Field Summary
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CssUrlFilterInputStream(InputStream in, ExternalizeManager extManager)
          Creates a new Instance.
 
Method Summary
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssUrlFilterInputStream

public CssUrlFilterInputStream(InputStream in,
                               ExternalizeManager extManager)
Creates a new Instance.

Parameters:
in - the InputStream to filter
extManager - The ExternalizeManager to use for Image externalization.
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class BufferedInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class BufferedInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException


wingS Swings ;-)