|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.lang.Entities
public class Entities
Provides HTML and XML entity utilities.
Field Summary | |
---|---|
static Entities |
HTML32
The set of entities supported by HTML 3.2. |
static Entities |
HTML40
The set of entities supported by HTML 4.0. |
static Entities |
XML
The set of entities supported by standard XML. |
Constructor Summary | |
---|---|
Entities()
|
Method Summary | |
---|---|
void |
addEntities(java.lang.String[][] entityArray)
|
void |
addEntity(java.lang.String name,
int value)
|
java.lang.String |
entityName(int value)
|
int |
entityValue(java.lang.String name)
|
java.lang.String |
escape(java.lang.String str)
Escapes the characters in a String . |
java.lang.String |
unescape(java.lang.String str)
Unescapes the entities in a String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Entities XML
The set of entities supported by standard XML.
public static final Entities HTML32
The set of entities supported by HTML 3.2.
public static final Entities HTML40
The set of entities supported by HTML 4.0.
Constructor Detail |
---|
public Entities()
Method Detail |
---|
public void addEntities(java.lang.String[][] entityArray)
public void addEntity(java.lang.String name, int value)
public java.lang.String entityName(int value)
public int entityValue(java.lang.String name)
public java.lang.String escape(java.lang.String str)
Escapes the characters in a String
.
For example, if you have called addEntity("foo", 0xA1), escape("¡") will return "&foo;"
str
- The String
to escape.
String
.public java.lang.String unescape(java.lang.String str)
Unescapes the entities in a String
.
For example, if you have called addEntity("foo", 0xA1), unescape("&foo;") will return "¡"
str
- The String
to escape.
String
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |