Package org.htmlcleaner
Class SpecialEntity
- java.lang.Object
-
- org.htmlcleaner.SpecialEntity
-
public class SpecialEntity extends java.lang.Object
This class contains map with special entities used in HTML and their unicodes.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,SpecialEntity>
entities
private int
intCode
private java.lang.String
key
private static int
maxEntityLength
-
Constructor Summary
Constructors Modifier Constructor Description private
SpecialEntity(java.lang.String key, int intCode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addEntity(java.lang.String entityName, int intCode)
Add new entity to the set.char
getCharacter()
java.lang.String
getDecimalNCR()
static SpecialEntity
getEntity(java.lang.String key)
java.lang.String
getEscapedValue()
java.lang.String
getHexNCR()
int
getIntCode()
java.lang.String
getKey()
(package private) static int
getMaxEntityLength()
-
-
-
Field Detail
-
entities
private static java.util.Map<java.lang.String,SpecialEntity> entities
-
maxEntityLength
private static int maxEntityLength
-
key
private java.lang.String key
-
intCode
private int intCode
-
-
Method Detail
-
addEntity
public static void addEntity(java.lang.String entityName, int intCode) throws HtmlCleanerException
Add new entity to the set.- Parameters:
entityName
- Entity name, for example "pound"intCode
- Unicode of the entity, for example 163- Throws:
HtmlCleanerException
-
getEntity
public static SpecialEntity getEntity(java.lang.String key)
-
getMaxEntityLength
static int getMaxEntityLength()
-
getKey
public java.lang.String getKey()
-
getIntCode
public int getIntCode()
-
getCharacter
public char getCharacter()
-
getDecimalNCR
public java.lang.String getDecimalNCR()
- Returns:
- Numeric Character Reference in decimal format
-
getHexNCR
public java.lang.String getHexNCR()
- Returns:
- Numeric Character Reference in hex format
-
getEscapedValue
public java.lang.String getEscapedValue()
- Returns:
- Escaped value of the entity
-
-