WstxOutputProperties#P_OUTPUT_INVALID_CHAR_HANDLER.
The idea is that it should be easy to have a way to convert invalid
characters such as Ascii control characters into something that
is legal to include in XML content. This only allows for simple
char-by-char replacements, instead of something more advanced such
as escaping. If escaping is needed, check out
org.codehaus.stax2.XMLOutputFactory2#P_TEXT_ESCAPER instead.
Note about exceptions: choice of only allowing throwing of
IOExceptions is due to the way Woodstox stream writer
backend works; XmlWriter can only throw IOExceptions.
| Modifier and Type | Class and Description |
|---|---|
| public static class | InvalidCharHandler.
This handler implementation just throws an exception for all invalid characters encountered. |
| public static class | InvalidCharHandler.
Alternative to the default handler, this handler converts all invalid characters to the specified output character. |
| Modifier and Type | Method and Description |
|---|---|
| public char |
| convertInvalidChar | back to summary |
|---|---|
| public char convertInvalidChar(int invalidChar) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private static final InvalidCharHandler. | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public char | |
| public static InvalidCharHandler. |
| sInstance | back to summary |
|---|---|
| private static final InvalidCharHandler. | |
| SURR1_FIRST | back to summary |
|---|---|
| public static final int SURR1_FIRST | |
| SURR1_LAST | back to summary |
|---|---|
| public static final int SURR1_LAST | |
| SURR2_FIRST | back to summary |
|---|---|
| public static final int SURR2_FIRST | |
| SURR2_LAST | back to summary |
|---|---|
| public static final int SURR2_LAST | |
| FailingHandler | back to summary |
|---|---|
| protected FailingHandler() | |
| convertInvalidChar | back to summary |
|---|---|
| public char convertInvalidChar(int c) throws IOException Implements com.
| |
| getInstance | back to summary |
|---|---|
| public static InvalidCharHandler. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final char |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public char |
| mReplacementChar | back to summary |
|---|---|
| pack-priv final char mReplacementChar | |
| ReplacingHandler | back to summary |
|---|---|
| public ReplacingHandler(char c) | |
| convertInvalidChar | back to summary |
|---|---|
| public char convertInvalidChar(int c) throws IOException Implements com.
| |