For internal entities, the character arrays are referenced here, and read from as needed (they're read-only). External entities have mutable buffers, that are read into as needed.
Note
This maps CRLF (and CR) to LF without regard for whether it's in an external (parsed) entity or not. The XML 1.0 spec is inconsistent in explaining EOL handling; this is the sensible way.
| Modifier and Type | Field and Description |
|---|---|
| private char[] | |
| private static final int | |
| private DTDEventListener | |
| private int | |
| private InputSource | |
| private boolean | |
| private boolean | |
| private int | |
| private Locale | |
| private boolean | |
| private String | |
| private static final char[] | |
| private InputEntity | |
| private Reader | |
| private StringBuffer | |
| private boolean | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private boolean | |
| public void | |
| private void | |
| private void | |
| public char | getc()
gets the next Java character -- might be part of an XML text character represented by a surrogate pair, or be the end of the entity. |
| public int | |
| public String | getEncoding()
Returns the name of the encoding in use, else null; the name returned is in as standard a form as we can get. |
| public static InputEntity | |
| public int | |
| public String | |
| public char | |
| public String | |
| public String | |
| private InputEntity | |
| public boolean | ignorableWhitespace(DTDEventListener handler)
whitespace in markup (flagged to app, discardable) the document handler's ignorableWhitespace() method is called on all the whitespace found |
| public void | |
| public void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | parsedContent(DTDEventListener docHandler)
normal content; whitespace in markup may be handled specially if the parser uses the content model. |
| public boolean | |
| public boolean | |
| public InputEntity | |
| public String | |
| public void | |
| public void | |
| public boolean | unparsedContent(DTDEventListener
gets callbacks for character data docHandler, boolean if true, whitespace characters will
be reported using docHandler.ignorableWhitespace(); implicitly,
non-whitespace characters will cause validation errors ignorableWhitespace, String if true, ignorable whitespace
causes a validity error report as well as a callback whitespaceInvalidMessage)CDATA -- character data, terminated by "]]>" and optionally including unescaped markup delimiters (ampersand and left angle bracket). |
| buf | back to summary |
|---|---|
| private char[] buf | |
| BUFSIZ | back to summary |
|---|---|
| private static final int BUFSIZ | |
| errHandler | back to summary |
|---|---|
| private DTDEventListener errHandler | |
| finish | back to summary |
|---|---|
| private int finish | |
| input | back to summary |
|---|---|
| private InputSource input | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| isPE | back to summary |
|---|---|
| private boolean isPE | |
| lineNumber | back to summary |
|---|---|
| private int lineNumber | |
| locale | back to summary |
|---|---|
| private Locale locale | |
| maybeInCRLF | back to summary |
|---|---|
| private boolean maybeInCRLF | |
| name | back to summary |
|---|---|
| private String name | |
| newline | back to summary |
|---|---|
| private static final char[] newline | |
| next | back to summary |
|---|---|
| private InputEntity next | |
| reader | back to summary |
|---|---|
| private Reader reader | |
| rememberedText | back to summary |
|---|---|
| private StringBuffer rememberedText | |
| returnedFirstHalf | back to summary |
|---|---|
| private boolean returnedFirstHalf | |
| start | back to summary |
|---|---|
| private int start | |
| startRemember | back to summary |
|---|---|
| private int startRemember | |
| InputEntity | back to summary |
|---|---|
| private InputEntity() | |
| checkRecursion | back to summary |
|---|---|
| private void checkRecursion(InputEntity stack) throws SAXException | |
| checkSurrogatePair | back to summary |
|---|---|
| private boolean checkSurrogatePair(int offset) throws SAXException | |
| close | back to summary |
|---|---|
| public void close() | |
| fatal | back to summary |
|---|---|
| private void fatal(String messageId, Object[] params) throws SAXException | |
| fillbuf | back to summary |
|---|---|
| private void fillbuf() throws IOException, SAXException | |
| getc | back to summary |
|---|---|
| public char getc() throws IOException, SAXException gets the next Java character -- might be part of an XML text character represented by a surrogate pair, or be the end of the entity. | |
| getColumnNumber | back to summary |
|---|---|
| public int getColumnNumber() returns -1; maintaining column numbers hurts performance | |
| getEncoding | back to summary |
|---|---|
| public String getEncoding() Returns the name of the encoding in use, else null; the name returned is in as standard a form as we can get. | |
| getInputEntity | back to summary |
|---|---|
| public static InputEntity getInputEntity(DTDEventListener h, Locale l) | |
| getLineNumber | back to summary |
|---|---|
| public int getLineNumber() Returns the current line number in this input source | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getNameChar | back to summary |
|---|---|
| public char getNameChar() throws IOException, SAXException returns the next name char, or NUL ... faster than getc(), and the common "name or nmtoken must be next" case won't need ungetc(). | |
| getPublicId | back to summary |
|---|---|
| public String getPublicId() Returns the public ID of this input source, if known | |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() Returns the system ID of this input source, if known | |
| getTopEntity | back to summary |
|---|---|
| private InputEntity getTopEntity() | |
| ignorableWhitespace | back to summary |
|---|---|
| public boolean ignorableWhitespace(DTDEventListener handler) throws IOException, SAXException whitespace in markup (flagged to app, discardable) the document handler's ignorableWhitespace() method is called on all the whitespace found | |
| init | back to summary |
|---|---|
| public void init(InputSource in, String name, InputEntity stack, boolean isPE) throws IOException, SAXException | |
| init | back to summary |
|---|---|
| public void init(char[] b, String name, InputEntity stack, boolean isPE) throws SAXException | |
| isDocument | back to summary |
|---|---|
| public boolean isDocument() | |
| isEOF | back to summary |
|---|---|
| public boolean isEOF() throws IOException, SAXException returns true iff there's no more data to consume ... | |
| isInternal | back to summary |
|---|---|
| public boolean isInternal() | |
| isParameterEntity | back to summary |
|---|---|
| public boolean isParameterEntity() | |
| maybeWhitespace | back to summary |
|---|---|
| public boolean maybeWhitespace() throws IOException, SAXException optional grammatical whitespace (discarded) | |
| parsedContent | back to summary |
|---|---|
| public boolean parsedContent(DTDEventListener docHandler) throws IOException, SAXException normal content; whitespace in markup may be handled specially if the parser uses the content model. content terminates with markup delimiter characters, namely ampersand (&) and left angle bracket (<). the document handler's characters() method is called on all the content found | |
| peek | back to summary |
|---|---|
| public boolean peek(String next, char[] chars) throws IOException, SAXException returns false iff 'next' string isn't as provided, else skips that text and returns true. Note two alternative string representations are both passed in, since one is faster. | |
| peekc | back to summary |
|---|---|
| public boolean peekc(char c) throws IOException, SAXException lookahead one character | |
| pop | back to summary |
|---|---|
| public InputEntity pop() throws IOException | |
| rememberText | back to summary |
|---|---|
| public String rememberText() | |
| startRemembering | back to summary |
|---|---|
| public void startRemembering() | |
| ungetc | back to summary |
|---|---|
| public void ungetc() two character pushback is guaranteed | |
| unparsedContent | back to summary |
|---|---|
| public boolean unparsedContent(DTDEventListener docHandler, boolean ignorableWhitespace, String whitespaceInvalidMessage) throws IOException, SAXException CDATA -- character data, terminated by "]]>" and optionally including unescaped markup delimiters (ampersand and left angle bracket). This should otherwise be exactly like character data, modulo differences in error report details. The document handler's characters() or ignorableWhitespace() methods are invoked on all the character data found
| |