| java.lang.Object com.sun.xml.dtdparser.InputEntity
InputEntity | public class InputEntity (Code) | | This is how the parser talks to its input entities, of all kinds.
The entities are in a stack.
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.
author: David Brownell author: Janet Koenig version: 1.4 00/08/05 |
Method Summary | |
public void | close() | public int | getColumnNumber() | 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 | getInputEntity(DTDEventListener h, Locale l) | public int | getLineNumber() | public String | getName() | public char | getNameChar() returns the next name char, or NUL ... | public String | getPublicId() | public String | getSystemId() | 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 boolean | ignorableWhitespace(DTDEventListener handler) | public void | init(InputSource in, String name, InputEntity stack, boolean isPE) | public void | init(char b, String name, InputEntity stack, boolean isPE) | public boolean | isDocument() | public boolean | isEOF() returns true iff there's no more data to consume ... | public boolean | isInternal() | public boolean | isParameterEntity() | public boolean | maybeWhitespace() | public boolean | parsedContent(DTDEventListener docHandler) normal content; whitespace in markup may be handled
specially if the parser uses the content model. | public boolean | peek(String next, char chars) returns false iff 'next' string isn't as provided,
else skips that text and returns true. | public boolean | peekc(char c) | public InputEntity | pop() | public String | rememberText() | public void | startRemembering() | public void | ungetc() | public boolean | unparsedContent(DTDEventListener docHandler, boolean ignorableWhitespace, String whitespaceInvalidMessage) CDATA -- character data, terminated by "]]>" and optionally
including unescaped markup delimiters (ampersand and left angle
bracket). |
close | public void close()(Code) | | |
getColumnNumber | public int getColumnNumber()(Code) | | returns -1; maintaining column numbers hurts performance
|
getEncoding | public String getEncoding()(Code) | | Returns the name of the encoding in use, else null; the name
returned is in as standard a form as we can get.
|
getLineNumber | public int getLineNumber()(Code) | | Returns the current line number in this input source
|
getNameChar | public char getNameChar() throws IOException, SAXException(Code) | | 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 | public String getPublicId()(Code) | | Returns the public ID of this input source, if known
|
getSystemId | public String getSystemId()(Code) | | Returns the system ID of this input source, if known
|
getc | public char getc() throws IOException, SAXException(Code) | | 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.
|
ignorableWhitespace | public boolean ignorableWhitespace(DTDEventListener handler) throws IOException, SAXException(Code) | | whitespace in markup (flagged to app, discardable)
the document handler's ignorableWhitespace() method
is called on all the whitespace found
|
isDocument | public boolean isDocument()(Code) | | |
isInternal | public boolean isInternal()(Code) | | |
isParameterEntity | public boolean isParameterEntity()(Code) | | |
parsedContent | public boolean parsedContent(DTDEventListener docHandler) throws IOException, SAXException(Code) | | 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 | public boolean peek(String next, char chars) throws IOException, SAXException(Code) | | 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.
|
startRemembering | public void startRemembering()(Code) | | |
ungetc | public void ungetc()(Code) | | two character pushback is guaranteed
|
unparsedContent | public boolean unparsedContent(DTDEventListener docHandler, boolean ignorableWhitespace, String whitespaceInvalidMessage) throws IOException, SAXException(Code) | | 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
Parameters: docHandler - gets callbacks for character data Parameters: ignorableWhitespace - if true, whitespace characters willbe reported using docHandler.ignorableWhitespace(); implicitly,non-whitespace characters will cause validation errors Parameters: whitespaceInvalidMessage - if true, ignorable whitespacecauses a validity error report as well as a callback |
|
|