Package org.apache.jasper.xmlparser
Class XMLChar
- java.lang.Object
-
- org.apache.jasper.xmlparser.XMLChar
-
@Deprecated public class XMLChar extends Object
Deprecated.Will be removed in Tomcat 9.0.x onwardsThis class defines the basic XML character properties. The data in this class can be used to verify that a character is a valid XML character or if the character is a space, name start, or name character.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
CHARSarray 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 theisValidmethod for details.- Author:
- Glenn Marcy, IBM, Andy Clark, IBM, Eric Ye, IBM, Arnaud Le Hors, IBM, Michael Glavassevich, IBM, Rahul Srivastava, Sun Microsystems Inc.
-
-
Constructor Summary
Constructors Constructor Description XMLChar()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanisContent(int c)Deprecated.Returns true if the specified character can be considered content.static booleanisHighSurrogate(int c)Deprecated.Returns whether the given character is a high surrogatestatic booleanisInvalid(int c)Deprecated.Returns true if the specified character is invalid.static booleanisLowSurrogate(int c)Deprecated.Returns whether the given character is a low surrogatestatic booleanisName(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 booleanisNameStart(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 booleanisSpace(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 booleanisValid(int c)Deprecated.Returns true if the specified character is valid.static booleanisValidIANAEncoding(String ianaEncoding)Deprecated.Returns true if the encoding name is a valid IANA encoding.static intsupplemental(char h, char l)Deprecated.Returns the supplemental character corresponding to the given surrogates.
-
-
-
Method Detail
-
supplemental
public static int supplemental(char h, char l)Deprecated.Returns the supplemental character corresponding to the given surrogates.- Parameters:
h- The high surrogate.l- The low surrogate.- Returns:
- the supplemental character
-
isHighSurrogate
public static boolean isHighSurrogate(int c)
Deprecated.Returns whether the given character is a high surrogate- Parameters:
c- The character to check.- Returns:
trueif the character is a surrogate
-
isLowSurrogate
public static boolean isLowSurrogate(int c)
Deprecated.Returns whether the given character is a low surrogate- Parameters:
c- The character to check.- Returns:
trueif the character is a surrogate
-
isValid
public static boolean isValid(int c)
Deprecated.Returns true if the specified character is valid. This method also checks the surrogate character range from 0x10000 to 0x10FFFF.If the program chooses to apply the mask directly to the
CHARSarray, then they are responsible for checking the surrogate character range.- Parameters:
c- The character to check.- Returns:
trueif the character is valid
-
isInvalid
public static boolean isInvalid(int c)
Deprecated.Returns true if the specified character is invalid.- Parameters:
c- The character to check.- Returns:
trueif the character is invalid
-
isContent
public static boolean isContent(int c)
Deprecated.Returns true if the specified character can be considered content.- Parameters:
c- The character to check.- Returns:
trueif the character is content
-
isSpace
public 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.- Parameters:
c- The character to check.- Returns:
trueif the character is space
-
isNameStart
public 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.- Parameters:
c- The character to check.- Returns:
trueif the character is a valid start name
-
isName
public 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.- Parameters:
c- The character to check.- Returns:
trueif the character is valid in a name
-
isValidIANAEncoding
public static boolean isValidIANAEncoding(String ianaEncoding)
Deprecated.Returns true if the encoding name is a valid IANA encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an IANA encoding name.- Parameters:
ianaEncoding- The IANA encoding name.- Returns:
trueif the character is valid encoding
-
-