| java.lang.Object org.apache.commons.lang.Entities
Inner Class :static interface EntityMap | |
Inner Class :static class PrimitiveEntityMap implements EntityMap | |
Inner Class :static class HashEntityMap extends MapIntMap | |
Inner Class :static class TreeEntityMap extends MapIntMap | |
Inner Class :static class LookupEntityMap extends PrimitiveEntityMap | |
Inner Class :static class ArrayEntityMap implements EntityMap | |
Inner Class :static class BinaryEntityMap extends ArrayEntityMap | |
Method Summary | |
public void | addEntities(String[][] entityArray)
Adds entities to this entity. | public void | addEntity(String name, int value)
Add an entity to this entity. | public String | entityName(int value)
Returns the name of the entity identified by the specified value. | public int | entityValue(String name)
Returns the value of the entity identified by the specified name. | public String | escape(String str)
Escapes the characters in a String .
For example, if you have called addEntity("foo", 0xA1), escape("\u00A1") will return
"&foo;"
Parameters: str - The String to escape. | public void | escape(Writer writer, String str)
Escapes the characters in the String passed and writes the result to the Writer
passed.
Parameters: writer - The Writer to write the results of the escaping to. | static void | fillWithHtml40Entities(Entities entities)
Fills the specified entities instance with HTML 40 entities. | public String | unescape(String str)
Unescapes the entities in a String .
For example, if you have called addEntity("foo", 0xA1), unescape("&foo;") will return
"\u00A1"
Parameters: str - The String to escape. | public void | unescape(Writer writer, String str)
Unescapes the escaped entities in the String passed and writes the result to the
Writer passed. |
HTML32 | final public static Entities HTML32(Code) | |
The set of entities supported by HTML 3.2.
|
HTML40 | final public static Entities HTML40(Code) | |
The set of entities supported by HTML 4.0.
|
ISO8859_1_ARRAY | final static String[][] ISO8859_1_ARRAY(Code) | | |
XML | final public static Entities XML(Code) | |
The set of entities supported by standard XML.
|
addEntities | public void addEntities(String[][] entityArray)(Code) | |
Adds entities to this entity.
Parameters: entityArray - array of entities to be added |
addEntity | public void addEntity(String name, int value)(Code) | |
Add an entity to this entity.
Parameters: name - name of the entity Parameters: value - vale of the entity |
entityName | public String entityName(int value)(Code) | |
Returns the name of the entity identified by the specified value.
Parameters: value - the value to locate entity name associated with the specified value |
entityValue | public int entityValue(String name)(Code) | |
Returns the value of the entity identified by the specified name.
Parameters: name - the name to locate entity value associated with the specified name |
escape | public String escape(String str)(Code) | |
Escapes the characters in a String .
For example, if you have called addEntity("foo", 0xA1), escape("\u00A1") will return
"&foo;"
Parameters: str - The String to escape. A new escaped String . |
escape | public void escape(Writer writer, String str) throws IOException(Code) | |
Escapes the characters in the String passed and writes the result to the Writer
passed.
Parameters: writer - The Writer to write the results of the escaping to. Assumed to be a non-null value. Parameters: str - The String to escape. Assumed to be a non-null value. throws: IOException - when Writer passed throws the exception from calls to the Writer.write(int)methods. See Also: Entities.escape(String) See Also: Writer |
fillWithHtml40Entities | static void fillWithHtml40Entities(Entities entities)(Code) | |
Fills the specified entities instance with HTML 40 entities.
Parameters: entities - the instance to be filled. |
unescape | public String unescape(String str)(Code) | |
Unescapes the entities in a String .
For example, if you have called addEntity("foo", 0xA1), unescape("&foo;") will return
"\u00A1"
Parameters: str - The String to escape. A new escaped String . |
unescape | public void unescape(Writer writer, String str) throws IOException(Code) | |
Unescapes the escaped entities in the String passed and writes the result to the
Writer passed.
Parameters: writer - The Writer to write the results to; assumed to be non-null. Parameters: str - The source String to unescape; assumed to be non-null. throws: IOException - when Writer passed throws the exception from calls to the Writer.write(int)methods. See Also: Entities.escape(String) See Also: Writer |
|
|