|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.znerd.xmlenc.XMLChecker
Utility class that provides XML checking functionality.
| Constructor Summary | |
private |
XMLChecker()
Constructs a new XMLChecker object. |
| Method Summary | |
static void |
checkName(char[] ch,
int start,
int length)
Checks if the specified part of a character array matches the Name production. |
static void |
checkName(String s)
Checks if the specified string matches the Name production. |
static void |
checkPubidLiteral(char[] ch,
int start,
int length)
Checks if the specified part of a character array matches the PubidLiteral production. |
static void |
checkPubidLiteral(String s)
Checks if the specified string matches the PubidLiteral production. |
static void |
checkS(char[] ch,
int start,
int length)
Checks if the specified part of a character array matches the S (white space) production. |
static void |
checkS(String s)
Checks if the specified string matches the S (white space) production. |
static void |
checkSystemLiteral(char[] ch,
int start,
int length)
Checks if the specified part of a character array matches the SystemLiteral production. |
static void |
checkSystemLiteral(String s)
Checks if the specified string matches the SystemLiteral production. |
private static boolean |
isBaseChar(char c)
Determines if the specified character matches the BaseChar production. |
private static boolean |
isCombiningChar(char c)
Determines if the specified character matches the CombiningChar production. |
private static boolean |
isDigit(char c)
Determines if the specified character matches the Digit production. |
private static boolean |
isExtender(char c)
Determines if the specified character matches the Extender production. |
private static boolean |
isIdeographic(char c)
Determines if the specified character matches the Ideographic production. |
private static boolean |
isLetter(char c)
Determines if the specified character matches the Letter production. |
static boolean |
isName(String s)
Determines if the specified string matches the Name production. |
private static boolean |
isNameChar(char c)
Determines if the specified character matches the NameChar production. |
static boolean |
isPubidLiteral(String s)
Determines if the specified string matches the PubidLiteral production. |
static boolean |
isSystemLiteral(String s)
Determines if the specified string matches the SystemLiteral production. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
private XMLChecker()
XMLChecker object. This constructor is
private since no objects of this class should be created.
| Method Detail |
public static final void checkS(String s)
throws NullPointerException
See: Definition of S.
s - the character string to check, cannot be null.
NullPointerException - if s == null.
InvalidXMLException - if the specified character string does not match the S
production.
public static final void checkS(char[] ch,
int start,
int length)
throws NullPointerException,
IndexOutOfBoundsException,
InvalidXMLException
See: Definition of S.
ch - the character array that contains the characters to be checked,
cannot be null.start - the start index into ch, must be >= 0.length - the number of characters to take from ch, starting at
the start index.
NullPointerException - if ch == null.
IndexOutOfBoundsException - if start < 0
|| start + length > ch.length.
InvalidXMLException - if the specified character string does not match the S
production.
public static final boolean isName(String s)
throws NullPointerException
See: Definition of Name.
s - the character string to check, cannot be null.
true if the String matches the production, or
false otherwise.
NullPointerException - if s == null.
public static final void checkName(String s)
throws NullPointerException,
InvalidXMLException
See: Definition of Name.
s - the character string to check, cannot be null.
NullPointerException - if s == null.
InvalidXMLException - if the specified character string does not match the Name
production.
public static final void checkName(char[] ch,
int start,
int length)
throws NullPointerException,
IndexOutOfBoundsException,
InvalidXMLException
See: Definition of Name.
ch - the character array that contains the characters to be checked,
cannot be null.start - the start index into ch, must be >= 0.length - the number of characters to take from ch, starting at
the start index.
NullPointerException - if ch == null.
IndexOutOfBoundsException - if start < 0
|| start + length > ch.length.
InvalidXMLException - if the specified character string does not match the Name
production.
public static final boolean isSystemLiteral(String s)
throws NullPointerException
See: Definition of SystemLiteral.
s - the character string to check, cannot be null.
true if the String matches the production, or
false otherwise.
NullPointerException - if s == null.
public static final void checkSystemLiteral(String s)
throws NullPointerException,
InvalidXMLException
See: Definition of SystemLiteral.
s - the character string to check, cannot be null.
NullPointerException - if s == null.
InvalidXMLException - if the specified character string does not match the
PubidLiteral production.
public static final void checkSystemLiteral(char[] ch,
int start,
int length)
throws NullPointerException,
IndexOutOfBoundsException,
InvalidXMLException
See: Definition of SystemLiteral.
ch - the character array that contains the characters to be checked,
cannot be null.start - the start index into ch, must be >= 0.length - the number of characters to take from ch, starting at
the start index.
NullPointerException - if ch == null.
IndexOutOfBoundsException - if start < 0
|| start + length > ch.length.
InvalidXMLException - if the specified character string does not match the
SystemLiteral production.
public static final boolean isPubidLiteral(String s)
throws NullPointerException
See: Definition of PubidLiteral.
s - the character string to check, cannot be null.
true if the String matches the production, or
false otherwise.
NullPointerException - if s == null.
public static final void checkPubidLiteral(String s)
throws NullPointerException,
InvalidXMLException
See: Definition of PubidLiteral.
s - the character string to check, cannot be null.
NullPointerException - if s == null.
InvalidXMLException - if the specified character string does not match the
PubidLiteral production.
public static final void checkPubidLiteral(char[] ch,
int start,
int length)
throws NullPointerException,
IndexOutOfBoundsException,
InvalidXMLException
See: Definition of PubidLiteral.
ch - the character array that contains the characters to be checked,
cannot be null.start - the start index into ch, must be >= 0.length - the number of characters to take from ch, starting at
the start index.
NullPointerException - if ch == null.
IndexOutOfBoundsException - if start < 0
|| start + length > ch.length.
InvalidXMLException - if the specified character string does not match the
PubidLiteral production.private static final boolean isNameChar(char c)
See: Definition of NameChar.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isLetter(char c)
See: Definition of Letter.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isBaseChar(char c)
See: Definition of BaseChar.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isIdeographic(char c)
See: Definition of Ideographic.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isCombiningChar(char c)
See: Definition of CombiningChar.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isDigit(char c)
See: Definition of Digit.
c - the character to check.
true if the character matches the production, or
false if it does not.private static final boolean isExtender(char c)
See: Definition of Extender.
c - the character to check.
true if the character matches the production, or
false if it does not.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||