public class EscapingOutputStreamWriter extends OutputStreamWriter
XMLStreamWriter that filters out UTF-8 characters that
are illegal in XML.| Modifier and Type | Field and Description |
|---|---|
static char |
SUBSTITUTE
A character that is used to replace illegal characters.
|
| Constructor and Description |
|---|
EscapingOutputStreamWriter(OutputStream out,
String charsetName)
Creates an OutputStreamWriter that uses the named charset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str,
int off,
int len) |
close, flush, getEncodingpublic static final char SUBSTITUTE
public EscapingOutputStreamWriter(OutputStream out, String charsetName) throws UnsupportedEncodingException
out - An OutputStreamcharsetName - The name of a supported
charsetUnsupportedEncodingException - If the named encoding is not supportedpublic void write(int c)
throws IOException
write in class OutputStreamWriterIOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class OutputStreamWriterIOExceptionpublic void write(String str, int off, int len) throws IOException
write in class OutputStreamWriterIOExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.