com.ibm.workflow.util.fdl.make
Class SubstWriter
java.lang.Object
|
+--java.io.Writer
|
+--java.io.FilterWriter
|
+--com.ibm.workflow.util.fdl.make.SubstWriter
- public final class SubstWriter
- extends java.io.FilterWriter
A FilterWriter which can be used to post-process the output of a visitor. It will look for %XXX% tags, and
if it finds a corresponding XXX=YYY entry in its map, it will replace the %XXX% tag with YYY.
- Version:
- 1.2
- Author:
- Robert Junghuber (junghub@de.ibm.com)
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
SubstWriter(java.io.Writer out,
java.util.Hashtable map)
Construct a SubstWriter on top of a given Writer. |
Method Summary |
void |
close()
Perform tag substitution, flush the buffer and close the stream. |
void |
flush()
Overwrite flush with no-op. |
void |
write(char[] cbuf,
int off,
int len)
Write a (sub-array of a) character array |
void |
write(int c)
Write a single character |
void |
write(java.lang.String s,
int off,
int len)
Write a (sub-) string |
Methods inherited from class java.io.Writer |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubstWriter
public SubstWriter(java.io.Writer out,
java.util.Hashtable map)
- Construct a SubstWriter on top of a given Writer.
write
public final void write(int c)
throws java.io.IOException
- Write a single character
- Overrides:
write
in class java.io.FilterWriter
write
public final void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Write a (sub-array of a) character array
- Overrides:
write
in class java.io.FilterWriter
write
public final void write(java.lang.String s,
int off,
int len)
throws java.io.IOException
- Write a (sub-) string
- Overrides:
write
in class java.io.FilterWriter
flush
public void flush()
- Overwrite flush with no-op.
- Overrides:
flush
in class java.io.FilterWriter
close
public void close()
throws java.io.IOException
- Perform tag substitution, flush the buffer and close the stream.
- Overrides:
close
in class java.io.FilterWriter