|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.beasys.commerce.util.dom.EntityFixer
A utility class for replacing standard XML entities with their character values.
Field Summary | |
protected static String[][] |
defReplaceEntities
Default XML/HTML entities that represent special character sequences. |
protected Hashtable |
entities
Our character to entity mapping. |
protected static EntityFixer |
instance
The singleton EntityFixer. |
Constructor Summary | |
EntityFixer()
Constructor. |
Method Summary | |
String |
addEntityMapping(String chars,
String value)
Add a characters to value mapping (i.e. "%" -> "&pect;") |
String |
fixEntities(String in)
|
String |
getEntityMapping(String chars)
Retrive the a current entity mapping. |
static EntityFixer |
getInstance()
Get the singleton instance. |
String |
removeEntityMapping(String chars)
Remove an entity mapping. |
static String |
replace(String inStr,
String find,
String replace)
Deprecated. Use StringUtils |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String[][] defReplaceEntities
protected Hashtable entities
protected static EntityFixer instance
Constructor Detail |
public EntityFixer()
This will initialize the entity mapping with the default values.
Method Detail |
public String addEntityMapping(String chars, String value)
chars
- the characters ("%").value
- the string to replace chars with ("&pect;").
IllegalArgumentException
- thrown if chars is "&".public String fixEntities(String in)
public String getEntityMapping(String chars)
public static EntityFixer getInstance()
public String removeEntityMapping(String chars)
public static String replace(String inStr, String find, String replace)
StringUtils
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |