@Deprecated public class XMLChar extends Object
A series of convenience methods are supplied to ease the burden
of the developer. Because inlining the checks can improve per
character performance, the tables of character properties are
public. Using the character as an index into the CHARS
array and applying the appropriate mask flag (e.g.
MASK_VALID
), yields the same results as calling the
convenience methods. There is one exception: check the comments
for the isValid
method for details.
Constructor and Description |
---|
XMLChar()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isContent(int c)
Deprecated.
Returns true if the specified character can be considered content.
|
static boolean |
isHighSurrogate(int c)
Deprecated.
Returns whether the given character is a high surrogate
|
static boolean |
isInvalid(int c)
Deprecated.
Returns true if the specified character is invalid.
|
static boolean |
isLowSurrogate(int c)
Deprecated.
Returns whether the given character is a low surrogate
|
static boolean |
isName(int c)
Deprecated.
Returns true if the specified character is a valid name
character as defined by production [4] in the XML 1.0
specification.
|
static boolean |
isNameStart(int c)
Deprecated.
Returns true if the specified character is a valid name start
character as defined by production [5] in the XML 1.0
specification.
|
static boolean |
isSpace(int c)
Deprecated.
Returns true if the specified character is a space character
as defined by production [3] in the XML 1.0 specification.
|
static boolean |
isValid(int c)
Deprecated.
Returns true if the specified character is valid.
|
static boolean |
isValidIANAEncoding(String ianaEncoding)
Deprecated.
Returns true if the encoding name is a valid IANA encoding.
|
static int |
supplemental(char h,
char l)
Deprecated.
Returns the supplemental character corresponding to the given
surrogates.
|
public static int supplemental(char h, char l)
h
- The high surrogate.l
- The low surrogate.public static boolean isHighSurrogate(int c)
c
- The character to check.true
if the character is a surrogatepublic static boolean isLowSurrogate(int c)
c
- The character to check.true
if the character is a surrogatepublic static boolean isValid(int c)
If the program chooses to apply the mask directly to the
CHARS
array, then they are responsible for checking
the surrogate character range.
c
- The character to check.true
if the character is validpublic static boolean isInvalid(int c)
c
- The character to check.true
if the character is invalidpublic static boolean isContent(int c)
c
- The character to check.true
if the character is contentpublic static boolean isSpace(int c)
c
- The character to check.true
if the character is spacepublic static boolean isNameStart(int c)
c
- The character to check.true
if the character is a valid start namepublic static boolean isName(int c)
c
- The character to check.true
if the character is valid in a namepublic static boolean isValidIANAEncoding(String ianaEncoding)
ianaEncoding
- The IANA encoding name.true
if the character is valid encodingCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.