ccs.xml
Class EscapingOutputWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
ccs.xml.EscapingOutputWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
public class EscapingOutputWriter
- extends java.io.FilterWriter
Writes a markup-friendly version of whatever it's fed. In this version,
various characters which tend to break markup when inserted into it in places
where plain text is expected, are expanded into HTML entities, which should be
harmless.
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
EscapingOutputWriter(java.io.Writer out)
A writer which escapes all the usual suspects. |
EscapingOutputWriter(java.io.Writer out,
java.lang.String bypass)
A writer which escapes all the usual suspects, except any such which appear
in the supplied bypass string. |
Method Summary |
void |
close()
|
void |
flush()
|
boolean |
isAllWhitespace()
Whether the writer has only processed whitespace up to the present point. |
void |
write(char[] cs,
int off,
int len)
|
void |
write(int c)
|
void |
write(java.lang.String s,
int off,
int len)
|
Methods inherited from class java.io.Writer |
append, append, append, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EscapingOutputWriter
public EscapingOutputWriter(java.io.Writer out)
- A writer which escapes all the usual suspects.
EscapingOutputWriter
public EscapingOutputWriter(java.io.Writer out,
java.lang.String bypass)
- A writer which escapes all the usual suspects, except any such which appear
in the supplied bypass string.
write
public void write(int c)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public void write(char[] cs,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public void write(java.lang.String s,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
isAllWhitespace
public boolean isAllWhitespace()
- Whether the writer has only processed whitespace up to the present point.
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterWriter
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterWriter
- Throws:
java.io.IOException