org.mmbase.util.transformers
Class TransformingWriter
java.lang.Object
java.io.Writer
java.io.PipedWriter
org.mmbase.util.transformers.TransformingWriter
- public class TransformingWriter
- extends PipedWriter
A Filtering Writer based on CharTransformers.
____ _________
/ \/ \
|this - PR --> W |
| PW | T |
\____/ \________/
PR: piped reader, this PW: this writer, T: transformer
This writer can be instantiated with another Writer and a CharTransformer. All writing will be transformed by the given
CharTransformer before arriving at the given Writer.
When ready, this TransformingWriter should be 'closed'. A coding example can be found in this classe's main method.
- Since:
- MMBase-1.7
- Author:
- Michiel Meeuwissen
- See Also:
ChainedCharTransformer,
TransformingReader
|
Method Summary |
void |
close()
ALso closes the wrapped Writer. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransformingWriter
public TransformingWriter(Writer out,
CharTransformer charTransformer)
close
public void close()
throws IOException
-
ALso closes the wrapped Writer.
- Throws:
IOException
main
public static void main(String[] args)
MMBase build 1.8.1.20060716