Package org.jsoup.nodes
Class Entities
- java.lang.Object
-
- org.jsoup.nodes.Entities
-
public class Entities extends java.lang.Object
HTML entities, and escape routines. Source: W3C HTML named character references.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Entities.EscapeMode
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
codepointsForName(java.lang.String name, int[] codepoints)
static java.lang.String
getByName(java.lang.String name)
Get the character(s) represented by the named entitystatic java.lang.Character
getCharacterByName(java.lang.String name)
Deprecated.does not support characters outside the BMP or multiple character namesstatic boolean
isBaseNamedEntity(java.lang.String name)
Check if the input is a known named entity in the base entity set.static boolean
isNamedEntity(java.lang.String name)
Check if the input is a known named entity
-
-
-
Method Detail
-
isNamedEntity
public static boolean isNamedEntity(java.lang.String name)
Check if the input is a known named entity- Parameters:
name
- the possible entity name (e.g. "lt" or "amp")- Returns:
- true if a known named entity
-
isBaseNamedEntity
public static boolean isBaseNamedEntity(java.lang.String name)
Check if the input is a known named entity in the base entity set.- Parameters:
name
- the possible entity name (e.g. "lt" or "amp")- Returns:
- true if a known named entity in the base set
- See Also:
isNamedEntity(String)
-
getCharacterByName
public static java.lang.Character getCharacterByName(java.lang.String name)
Deprecated.does not support characters outside the BMP or multiple character namesGet the Character value of the named entity- Parameters:
name
- named entity (e.g. "lt" or "amp")- Returns:
- the Character value of the named entity (e.g. '<' or '&')
-
getByName
public static java.lang.String getByName(java.lang.String name)
Get the character(s) represented by the named entity- Parameters:
name
- entity (e.g. "lt" or "amp")- Returns:
- the string value of the character(s) represented by this entity, or "" if not defined
-
codepointsForName
public static int codepointsForName(java.lang.String name, int[] codepoints)
-
-