public class UESURIStringEscaper
extends java.lang.Object
UESURIStringEscaper takes care of escaping UES URI strings.
This class is NOT part of public URI API! It is intended only for internal usage within URI module.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CONTROL_CHARACTERS
String which contains all characters which belongs to "control" character category.
|
static java.lang.String |
ESCAPE_CHARS
The following characters must be escaped in UESURI.
|
static java.lang.String |
EXPR_IMMEDIATE_BEGIN
This is the character sequence which starts the immediate expression.
|
private static int |
MAX_NONESCAPED_CHAR_VALUE
Characters with a numerical value greater than this will be escaped.
|
protected static java.lang.String |
SPACE_CHARACTERS
String which contains all characters which belongs to "space" character category.
|
Modifier | Constructor and Description |
---|---|
protected |
UESURIStringEscaper()
Protected constructor.
|
Modifier and Type | Method and Description | ||||
---|---|---|---|---|---|
static java.lang.String |
escape(java.lang.String value)
This function replaces reserved characters and the more weird unicode
character with their escaped representation.
|
||||
static java.lang.String |
escape(java.lang.String value,
This function replaces reserved characters and the more weird characters with their
escaped representation.
|
||||
private static void |
escapeUnicodeChar(java.lang.StringBuffer sb,
Replaces a unicode character with its escaped representation (" ") and
appends the result to a StringBuffer.
|
||||
private static java.lang.String |
getControlCharacters()
Returns string which contains control characters (see BNF in
private static java.lang.String getSpaceCharacters()
Returns string which contains all characters which belongs to "space" category (see BNF in
private static java.lang.StringBuilder getStringWithCharacters(int begin,
Returns a string which contains all characters within specified range.
|
Returns string which contains all characters which belongs to "space" category (see BNF in UESURI HLC).
Returns string which contains control characters (see BNF in UESURI HLC).
Unicode code of control characters are: (" " ... "") | ("" ... "")
begin
- The lowest index of character (inclusive).end
- The highest index of character (inclusive).value
- the input stringvalue
- A string to escape.escapeDiacritics
- If this parameter has the true
value, diacritics
characters are escaped using Unicode escaping style.sb
- the stringbuffer to append the result toch
- the unicode character to escape