de.jstacs.utils
Class RegExFilterOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by de.jstacs.utils.RegExFilterOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class RegExFilterOutputStream
extends OutputStream

This class allows to filter individual lines that are then passed to an internal OutputStream.

Author:
Jens Keilwagen
See Also:
SafeOutputStream

Constructor Summary
RegExFilterOutputStream(OutputStream o, String regex)
          Creates a new RegExFilterOutputStream.
 
Method Summary
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExFilterOutputStream

public RegExFilterOutputStream(OutputStream o,
                               String regex)
Creates a new RegExFilterOutputStream.

Parameters:
o - the internal OutputStream
regex - the regular expression used to filter each line of the output
See Also:
String.matches(String)
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException