Class Entities
java.lang.Object
com.itextpdf.styledxmlparser.jsoup.nodes.Entities
HTML entities, and escape routines. Source: W3C
HTML named character references.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char[](package private) static final intprivate static final Document.OutputSettingsprivate static final intprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendEncoded(Appendable accum, Entities.EscapeMode escapeMode, int codePoint) private static booleancanEncode(Entities.CoreCharset charset, char c, CharsetEncoder fallback) static intcodepointsForName(String name, int[] codepoints) (package private) static voidescape(Appendable accum, String str, Document.OutputSettings out, boolean inAttribute, boolean normaliseWhite, boolean stripLeadingWhite) static StringHTML escape an input string, using the default settings (UTF-8, base entities).static Stringescape(String string, Document.OutputSettings out) HTML escape an input string.static StringGet the character(s) represented by the named entity(package private) static Entities.CoreCharsetgetCoreCharsetByName(String name) static booleanisBaseNamedEntity(String name) Check if the input is a known named entity in the base entity set.static booleanisNamedEntity(String name) Check if the input is a known named entityprivate static voidload(Entities.EscapeMode e, String pointsData, int size) static StringUn-escape an HTML escaped string.(package private) static StringUnescape the input string.
-
Field Details
-
empty
private static final int empty- See Also:
-
emptyName
- See Also:
-
codepointRadix
static final int codepointRadix- See Also:
-
codeDelims
private static final char[] codeDelims -
multipoints
-
DefaultOutput
-
-
Constructor Details
-
Entities
private Entities()
-
-
Method Details
-
isNamedEntity
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
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:
-
getByName
-
codepointsForName
-
escape
HTML escape an input string. That is,<is returned as<- Parameters:
string- the un-escaped string to escapeout- the output settings to use- Returns:
- the escaped string
-
escape
-
escape
static void escape(Appendable accum, String str, Document.OutputSettings out, boolean inAttribute, boolean normaliseWhite, boolean stripLeadingWhite) throws IOException - Throws:
IOException
-
appendEncoded
private static void appendEncoded(Appendable accum, Entities.EscapeMode escapeMode, int codePoint) throws IOException - Throws:
IOException
-
unescape
-
unescape
-
canEncode
-
getCoreCharsetByName
-
load
-