de.jstacs.utils
Class RegExFilterOutputStream
java.lang.Object
java.io.OutputStream
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
Method Summary |
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException