public class JavadocEscapeWriter extends FilterWriter
Writer that escapes characters that are unsafe as Javadoc comments.
Such characters include '<' and '&'.
Note that this class doesn't escape other Unicode characters that are typically unsafe. For example, 愛 (A kanji that means "love") can be considered as unsafe because javac with English Windows cannot accept this character in the source code.
If the application needs to escape such characters as well, then they are on their own.
out| Constructor and Description |
|---|
JavadocEscapeWriter(Writer aOut) |
| Modifier and Type | Method and Description |
|---|---|
void |
write(char[] aBuf) |
void |
write(char[] aBuf,
int nOfs,
int nLen) |
void |
write(int ch) |
void |
write(String sStr) |
void |
write(String sStr,
int nOfs,
int nLen) |
close, flushpublic void write(int ch)
throws IOException
write in class FilterWriterIOExceptionpublic void write(@Nonnull char[] aBuf, @Nonnegative int nOfs, @Nonnegative int nLen) throws IOException
write in class FilterWriterIOExceptionpublic void write(@Nonnull char[] aBuf) throws IOException
write in class WriterIOExceptionpublic void write(@Nonnull String sStr, @Nonnegative int nOfs, @Nonnegative int nLen) throws IOException
write in class FilterWriterIOExceptionpublic void write(@Nonnull String sStr) throws IOException
write in class WriterIOExceptionCopyright © 2013–2019 Philip Helger. All rights reserved.