public class EscapeHTMLWriter extends FilterWriter
out| Constructor and Description |
|---|
EscapeHTMLWriter(Writer out)Create an EscapeHTMLWriter wrapping the given writer. |
| Modifier and Type | Method and Description |
|---|---|
void | close()Does nothing. |
void | write(char[] cbuf,
int off,
int len)Write characters from a buffer, escaping HTML special characters. |
void | write(int c)Write a single character, escaping HTML special characters. |
void | write(String str,
int off,
int len)Write characters from a string, escaping HTML special characters. |
flushpublic EscapeHTMLWriter(Writer out)
out - the underlying writerpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class FilterWriterpublic void write(char[] cbuf,
int off,
int len)
throws IOExceptionwrite in class FilterWritercbuf - the character bufferoff - the start offset in the bufferlen - the number of characters to writeIOException - on I/O errorpublic void write(int c)
throws IOExceptionwrite in class FilterWriterc - the character valueIOException - on I/O errorpublic void write(String str, int off, int len) throws IOException
write in class FilterWriterstr - the string to writeoff - the start offset in the stringlen - the number of characters to writeIOException - on I/O error