|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javalite.common.XmlEntities
Escape instead
@Deprecated public class XmlEntities
Provides XML entity utilities.
This code was taken from Apache Commons in order to avoid adding a new dependency.
| Field Summary | |
|---|---|
static XmlEntities |
XML
Deprecated. The set of entities supported by standard XML. |
| Constructor Summary | |
|---|---|
XmlEntities()
Deprecated. Default constructor. |
|
| Method Summary | |
|---|---|
void |
addEntities(String[][] entityArray)
Deprecated. Adds entities to this entity. |
void |
addEntity(String name,
int value)
Deprecated. Add an entity to this entity. |
String |
entityName(int value)
Deprecated. Returns the name of the entity identified by the specified value. |
int |
entityValue(String name)
Deprecated. Returns the value of the entity identified by the specified name. |
String |
escape(String str)
Deprecated. Escapes the characters in a String. |
void |
escape(StringBuilder sb,
String str)
Deprecated. Escapes the characters in the String passed and writes the result to the StringBuilder
passed. |
void |
escape(Writer writer,
String str)
Deprecated. |
String |
unescape(String str)
Deprecated. Unescapes the entities in a String. |
void |
unescape(StringBuilder sb,
String str)
Deprecated. Unescapes the escaped entities in the String passed and writes the result to the
StringBuilder passed. |
void |
unescape(Writer writer,
String str)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final XmlEntities XML
The set of entities supported by standard XML.
| Constructor Detail |
|---|
public XmlEntities()
| Method Detail |
|---|
public void addEntities(String[][] entityArray)
Adds entities to this entity.
entityArray - array of entities to be added
public void addEntity(String name,
int value)
Add an entity to this entity.
name - name of the entityvalue - vale of the entitypublic String entityName(int value)
Returns the name of the entity identified by the specified value.
value - the value to locate
public int entityValue(String name)
Returns the value of the entity identified by the specified name.
name - the name to locate
public String escape(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 void escape(StringBuilder sb,
String str)
Escapes the characters in the String passed and writes the result to the StringBuilder
passed.
sb - The StringBuilder to write the results of the escaping to. Assumed to be a non-null value.str - The String to escape. Assumed to be a non-null value.escape(String),
StringBuilder
@Deprecated
public void escape(Writer writer,
String str)
throws IOException
IOExceptionpublic String unescape(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.
public void unescape(StringBuilder sb,
String str)
Unescapes the escaped entities in the String passed and writes the result to the
StringBuilder passed.
sb - The StringBuilder to write the results to; assumed to be non-null.str - The source String to unescape; assumed to be non-null.escape(String),
StringBuilder
@Deprecated
public void unescape(Writer writer,
String str)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||