public class HTMLEntitiesCoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map |
entitiesTable
Maps html entities to characters.
|
static java.util.Map |
inverseTable
The inverse of table entitiesTable.
|
Constructor and Description |
---|
HTMLEntitiesCoder()
Creates a new instance of HTMLEntitiesCoder
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decode(java.lang.String htmlText)
Decodes html entities in the text.
|
static java.lang.String |
encode(java.lang.String text) |
static java.lang.String |
encode(java.lang.String text,
boolean trytable)
Encodes all characters in the text with character code outside range
32 to 127 (inclusive) and the ampersand and less-than characters.
|
private static int |
getNumber(java.lang.String ent) |
public static final java.util.Map entitiesTable
public static final java.util.Map inverseTable
public HTMLEntitiesCoder()
public static java.lang.String encode(java.lang.String text)
public static java.lang.String encode(java.lang.String text, boolean trytable)
private static int getNumber(java.lang.String ent)
public static java.lang.String decode(java.lang.String htmlText)
Copyright 2004-2015 Wandora Team