Top Description Inners Fields Constructors Methods
org.apache.commons.lang3.text.translate

public Class NumericEntityUnescaper

extends CharSequenceTranslator
Class Inheritance
Annotations
@Deprecated
Imports
java.io.IOException, .Writer, java.util.Arrays, .Collections, .EnumSet, org.apache.commons.lang3.CharUtils

Deprecated

As of 3.6, use Apache Commons Text NumericEntityUnescaper.

Translate XML numeric entities of the form &#[xX]?\d+;? to the specific code point. Note that the semicolon is optional.
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
NumericEntityUnescaper.OPTION

Deprecated As of 3.18.0, use Apache Commons Text NumericEntityUnescaper.OPTION.
Enumerates NumericEntityUnescaper options for unescaping.

Field Summary

Modifier and TypeField and Description
private final EnumSet<NumericEntityUnescaper.OPTION>
Inherited from org.apache.commons.lang3.text.translate.CharSequenceTranslator:
HEX_DIGITS

Constructor Summary

AccessConstructor and Description
public
NumericEntityUnescaper(final NumericEntityUnescaper.OPTION...
to apply to this unescaper.
options
)
References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

Create a UnicodeUnescaper.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether the option is set.
isSet
(final NumericEntityUnescaper.OPTION
to check state of.
option
)
References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

Tests whether the passed in option is currently set.

public int
translate(final CharSequence input, final int index, final Writer out)

Implements abstract org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

Translate a set of code points, represented by an int index into a CharSequence, into another set of code points.

Inherited from org.apache.commons.lang3.text.translate.CharSequenceTranslator:
hextranslatetranslatewith

Field Detail

optionsback to summary
private final EnumSet<NumericEntityUnescaper.OPTION> options

Constructor Detail

NumericEntityUnescaperback to summary
public NumericEntityUnescaper(final NumericEntityUnescaper.OPTION... options)

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create a UnicodeUnescaper. The constructor takes a list of options, only one type of which is currently available (whether to allow, error or ignore the semicolon on the end of a numeric entity to being missing). For example, to support numeric entities without a ';': new NumericEntityUnescaper(NumericEntityUnescaper.OPTION.semiColonOptional) and to throw an IllegalArgumentException when they're missing: new NumericEntityUnescaper(NumericEntityUnescaper.OPTION.errorIfNoSemiColon) Note that the default behavior is to ignore them.

Parameters
options:NumericEntityUnescaper.OPTION[]

to apply to this unescaper.

Method Detail

isSetback to summary
public boolean isSet(final NumericEntityUnescaper.OPTION option)

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Tests whether the passed in option is currently set.

Parameters
option:NumericEntityUnescaper.OPTION

to check state of.

Returns:boolean

whether the option is set.

translateback to summary
public int translate(final CharSequence input, final int index, final Writer out) throws IOException

Implements abstract org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

Doc from org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

Translate a set of code points, represented by an int index into a CharSequence, into another set of code points. The number of code points consumed must be returned, and the only IOExceptions thrown must be from interacting with the Writer so that the top level API may reliably ignore StringWriter IOExceptions.

Annotations
@Override
Exceptions
IOException:
if and only if the Writer produces an IOException.
org.apache.commons.lang3.text.translate back to summary

public final Enum NumericEntityUnescaper.OPTION

extends Enum<NumericEntityUnescaper.OPTION>
Class Inheritance
Annotations
@Deprecated

Deprecated

As of 3.18.0, use Apache Commons Text NumericEntityUnescaper.OPTION.

Enumerates NumericEntityUnescaper options for unescaping.

Field Summary

Modifier and TypeField and Description
public static final NumericEntityUnescaper.OPTION
errorIfNoSemiColon

References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.
Throw an exception if a semicolon is missing.
public static final NumericEntityUnescaper.OPTION
semiColonOptional

References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.
Do not require a semicolon.
public static final NumericEntityUnescaper.OPTION
semiColonRequired

References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.
Require a semicolon.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static NumericEntityUnescaper.OPTION
valueOf(String name)
References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

public static NumericEntityUnescaper.OPTION[]
values()
References Deprecated NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

errorIfNoSemiColonback to summary
public static final NumericEntityUnescaper.OPTION errorIfNoSemiColon

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Throw an exception if a semicolon is missing.

semiColonOptionalback to summary
public static final NumericEntityUnescaper.OPTION semiColonOptional

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Do not require a semicolon.

semiColonRequiredback to summary
public static final NumericEntityUnescaper.OPTION semiColonRequired

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Require a semicolon.

Constructor Detail

OPTIONback to summary
private OPTION()

Method Detail

valueOfback to summary
public static NumericEntityUnescaper.OPTION valueOf(String name)

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

valuesback to summary
public static NumericEntityUnescaper.OPTION[] values()

References Deprecated

NumericEntityUnescaper.OPTION is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.