Class Overview
This class handles HTML escaping of text. It was written and optimized to be as fast as possible.
Summary
Fields |
protected
static
final
char[][] |
_stringChars |
We use arrays of char in the lookup table because it is faster appending this to a StringBuffer than appending a
String
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Constants
protected
static
final
int
MAX_LENGTH
Constant Value:
300
(0x0000012c)
Fields
protected
static
final
char[][]
_stringChars
We use arrays of char in the lookup table because it is faster appending this to a StringBuffer than appending a
String
Public Constructors
Public Methods
public
static
final
String
escapeHTML
(String s, boolean escapeEmpty)
Parameters
s
| string to be escaped |
escapeEmpty
| if true, then empty string will be escaped.
|
public
static
final
String
escapeHTML
(String s)
Call escapeHTML(s, false)
Protected Methods
protected
static
void
addMapping
(int c, String txt, String[] strings)
protected
static
void
initMapping
()