public class XMLEscapeUtil extends Object
Modifier and Type | Field and Description |
---|---|
static char |
ESCAPING_CHAR |
Constructor and Description |
---|
XMLEscapeUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
unicodeDecode(String string)
Substitutes all occurrences of '☃[0-9][0-9][0-9][0-9]' with their corresponding character codes.
|
static String |
unicodeEncode(String string)
Replaces all characters that are illegal in XML with a Java-like unicode escape sequence
'☃[0-9][0-9][0-9][0-9]'.
|
static int |
unicodeInPlaceEncode(char[] cbuf,
int off,
int len,
int maxLen,
Queue<Character> overflow)
Escaping characters in place in given buffer.
|
public static final char ESCAPING_CHAR
public static String unicodeEncode(String string)
null
is passed into this method, null
is returned.public static String unicodeDecode(String string)
null
is passed into this method, null
is returned.public static int unicodeInPlaceEncode(char[] cbuf, int off, int len, int maxLen, Queue<Character> overflow)
cbuf
- buffer with data - it will be overwritten with escaped dataoff
- offset of characters in buffer to be analyzed and escaped if neededlen
- number of characters to be analyzedmaxLen
- maximum number of characters that can be put into buffer (counting from offset)overflow
- should be empty when called, used to return overflow dataCopyright © 2002-2021 Atlassian. All Rights Reserved.