com.ctc.wstx.sr.StreamScanner , and its sub-classes)
to encapsulate input buffer portion of the class. Philosophically
this should probably be done via containment (composition), not
sub-classing but for performance reason, this "core" class is generally
extended from instead.
Main reason for the input data portion to be factored out of main class is that this way it can also be passed to nested input handling Objects, which can then manipulate input buffers of the caller, efficiently.
| Modifier and Type | Field and Description |
|---|---|
| public static final char | CHAR_NULL
Null-character is used as return value from some method(s), since it is not a legal character in an XML document. |
| public static final char | |
| public static final char | |
| public static final char | |
| public static final int | MAX_UNICODE_CHAR
This constant defines the highest Unicode character allowed in XML content. |
| protected long | mCurrInputProcessed
Number of characters that were contained in previous blocks (blocks that were already processed prior to the current buffer). |
| protected int | mCurrInputRow
Current row location of current point in input buffer, starting from 1 |
| protected int | mCurrInputRowStart
Current index of the first character of the current row in input buffer. |
| protected char[] | mInputBuffer
Current buffer from which data is read; generally data is read into buffer from input source, but not always (especially when using nested input contexts when expanding parsed entity references etc). |
| protected int | mInputEnd
Index of character after last available one in the buffer. |
| protected int | mInputPtr
Pointer to next available character in buffer |
| protected boolean | mXml11
Flag that indicates whether XML content is to be treated as per XML 1.1 specification or not (if not, it'll use xml 1.0). |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte[] | |
| private static final byte[] | |
| private static final int | VALID_CHAR_COUNT
We will only use validity array for first 256 characters, mostly because after those characters it's easier to do fairly simple block checks. |
| private static final int | VALID_PUBID_CHAR_COUNT
Public identifiers only use 7-bit ascii range. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | copyBufferStateFrom(WstxInputData src)
Note Only public due to sub-classes needing to call this on base class instance from different package (confusing?) |
| public static final int | Returns: Index of the first illegal xml name characters, if any; -1 if the name is completely legalMethod that can be called to check whether given String contains any characters that are not legal XML names. |
| public static final int | |
| public static String | |
| protected final boolean | isNameChar(char c)
Method that can be used to check whether specified character is a valid character of an XML 1.0/1.1 name as any other char than the first one; except that colon (:) is not recognized as valid here: caller has to verify it separately (since it generally affects namespace mapping of a qualified name). |
| public static final boolean | |
| protected final boolean | isNameStartChar(char c)
Method that can be used to check whether specified character is a valid first character of an XML 1.0/1.1 name; except that colon (:) is not recognized as a start char here: caller has to verify it separately (since it generally affects namespace mapping of a qualified name). |
| public static final boolean | |
| public static final boolean |
| CHAR_NULL | back to summary |
|---|---|
| public static final char CHAR_NULL Null-character is used as return value from some method(s), since it is not a legal character in an XML document. | |
| CHAR_SPACE | back to summary |
|---|---|
| public static final char CHAR_SPACE | |
| INT_NULL | back to summary |
|---|---|
| public static final char INT_NULL | |
| INT_SPACE | back to summary |
|---|---|
| public static final char INT_SPACE | |
| MAX_UNICODE_CHAR | back to summary |
|---|---|
| public static final int MAX_UNICODE_CHAR This constant defines the highest Unicode character allowed in XML content. | |
| mCurrInputProcessed | back to summary |
|---|---|
| protected long mCurrInputProcessed Number of characters that were contained in previous blocks (blocks that were already processed prior to the current buffer). | |
| mCurrInputRow | back to summary |
|---|---|
| protected int mCurrInputRow Current row location of current point in input buffer, starting from 1 | |
| mCurrInputRowStart | back to summary |
|---|---|
| protected int mCurrInputRowStart Current index of the first character of the current row in input buffer. Needed to calculate column position, if necessary; benefit of not having column itself is that this only has to be updated once per line. | |
| mInputBuffer | back to summary |
|---|---|
| protected char[] mInputBuffer Current buffer from which data is read; generally data is read into buffer from input source, but not always (especially when using nested input contexts when expanding parsed entity references etc). | |
| mInputEnd | back to summary |
|---|---|
| protected int mInputEnd Index of character after last available one in the buffer. | |
| mInputPtr | back to summary |
|---|---|
| protected int mInputPtr Pointer to next available character in buffer | |
| mXml11 | back to summary |
|---|---|
| protected boolean mXml11 Flag that indicates whether XML content is to be treated as per XML 1.1 specification or not (if not, it'll use xml 1.0). | |
| NAME_CHAR_ALL_VALID_B | back to summary |
|---|---|
| private static final byte NAME_CHAR_ALL_VALID_B | |
| NAME_CHAR_INVALID_B | back to summary |
|---|---|
| private static final byte NAME_CHAR_INVALID_B | |
| NAME_CHAR_VALID_NONFIRST_B | back to summary |
|---|---|
| private static final byte NAME_CHAR_VALID_NONFIRST_B | |
| PUBID_CHAR_VALID_B | back to summary |
|---|---|
| private static final byte PUBID_CHAR_VALID_B | |
| sCharValidity | back to summary |
|---|---|
| private static final byte[] sCharValidity | |
| sPubidValidity | back to summary |
|---|---|
| private static final byte[] sPubidValidity | |
| VALID_CHAR_COUNT | back to summary |
|---|---|
| private static final int VALID_CHAR_COUNT We will only use validity array for first 256 characters, mostly because after those characters it's easier to do fairly simple block checks. | |
| VALID_PUBID_CHAR_COUNT | back to summary |
|---|---|
| private static final int VALID_PUBID_CHAR_COUNT Public identifiers only use 7-bit ascii range. | |
| WstxInputData | back to summary |
|---|---|
| protected WstxInputData() | |
| copyBufferStateFrom | back to summary |
|---|---|
| public void copyBufferStateFrom(WstxInputData src) Note Only public due to sub-classes needing to call this on base class instance from different package (confusing?) | |
| findIllegalNameChar | back to summary |
|---|---|
| public static final int findIllegalNameChar(String name, boolean nsAware, boolean xml11) Method that can be called to check whether given String contains any characters that are not legal XML names.
| |
| findIllegalNmtokenChar | back to summary |
|---|---|
| public static final int findIllegalNmtokenChar(String nmtoken, boolean nsAware, boolean xml11) | |
| getCharDesc | back to summary |
|---|---|
public static String getCharDesc(char c)
| |
| isNameChar | back to summary |
|---|---|
| protected final boolean isNameChar(char c) Method that can be used to check whether specified character is a valid character of an XML 1.0/1.1 name as any other char than the first one; except that colon (:) is not recognized as valid here: caller has to verify it separately (since it generally affects namespace mapping of a qualified name). | |
| isNameChar | back to summary |
|---|---|
| public static final boolean isNameChar(char c, boolean nsAware, boolean xml11) | |
| isNameStartChar | back to summary |
|---|---|
| protected final boolean isNameStartChar(char c) Method that can be used to check whether specified character is a valid first character of an XML 1.0/1.1 name; except that colon (:) is not recognized as a start char here: caller has to verify it separately (since it generally affects namespace mapping of a qualified name). | |
| isNameStartChar | back to summary |
|---|---|
| public static final boolean isNameStartChar(char c, boolean nsAware, boolean xml11) | |
| isSpaceChar | back to summary |
|---|---|
| public static final boolean isSpaceChar(char c) | |