Package org.cthing.escapers
Enum Class HtmlEscaper.Option
- All Implemented Interfaces:
Serializable,Comparable<HtmlEscaper.Option>,Constable
- Enclosing class:
- HtmlEscaper
Escaping options.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEscape characters above the ASCII range (i.e.Use decimal for numerical character entities (i.e.Replaces characters in the HTML 4 extended range (0x100 - 0xFFFF) with their corresponding named entity references where they exist.Replaces characters in the ISO Latin-1 range (0x80 - 0xFF) with their corresponding named entity references. -
Method Summary
Modifier and TypeMethodDescriptionstatic HtmlEscaper.OptionReturns the enum constant of this class with the specified name.static HtmlEscaper.Option[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
USE_DECIMAL
Use decimal for numerical character entities (i.e. &#DDDD;). By default, this library uses hexadecimal (i.e. &#xHHH;) for numerical character entities. -
ESCAPE_NON_ASCII
Escape characters above the ASCII range (i.e. ch > 0x7F). By default, only ASCII control characters and markup-significant ASCII characters are escaped. Specifying this option causes all ISO Latin-1, Unicode BMP and surrogate pair characters to be escaped. -
USE_ISO_LATIN_1_ENTITIES
Replaces characters in the ISO Latin-1 range (0x80 - 0xFF) with their corresponding named entity references. For example, the pound character (0xA3) is replaced with the pound entity reference (£). See Section 24.2 of the HTML 4 specification for the complete list of ISO Latin-1 character entities.Note that markup-significant HTML escapes are always applied (e.g. <, ") regardless of the use of this option.
-
USE_HTML4_EXTENDED_ENTITIES
Replaces characters in the HTML 4 extended range (0x100 - 0xFFFF) with their corresponding named entity references where they exist. For example, the pi character (0x3A0) is replaced with the pi entity reference (π). See Section 24.3 and Section 24.4 of the HTML 4 specification for the complete list of these character entities.Note that markup-significant HTML escapes are always applied (e.g. <, ") regardless of the use of this option.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-