| java.lang.Object org.apache.xerces.readers.XMLEntityReader org.apache.xerces.readers.AbstractCharReader
All known Subclasses: org.apache.xerces.readers.CharReader, org.apache.xerces.readers.UTF8CharReader,
AbstractCharReader | abstract class AbstractCharReader extends XMLEntityReader (Code) | | An abstract class for readers that process input data as characters.
This is the base class of the CharReader and UTF8CharReader classes.
The CharReader classes fills in the "chunks" of data to process from
a character stream (java.io.Reader). The UTF8CharReader performs
its own UTF-8 transcoding to fill in the data from an InputStream.
version: $Id: AbstractCharReader.java,v 1.9 2001/02/01 09:58:21 andyc Exp $ |
Method Summary | |
public int | addString(int offset, int length) Add a string to the StringPool from the characters scanned using this
reader as described by offset and length .
Parameters: offset - The offset within this reader where the characters start. Parameters: length - The length within this reader where the characters end. | public int | addSymbol(int offset, int length) Add a symbol to the StringPool from the characters scanned using this
reader as described by offset and length .
Parameters: offset - The offset within this reader where the characters start. Parameters: length - The length within this reader where the characters end. | public void | append(XMLEntityHandler.CharBuffer charBuffer, int offset, int length) Append the characters processed by this reader associated with offset and
length to the CharBuffer . | protected XMLEntityHandler.EntityReader | changeReaders() Change readers at end of input. | protected void | deferException(int errorCode, Object[] args, int offset) Delay reporting an error message.
If there is an error detected in the underlying input stream during
the fillCurrentChunk method, the error is described here and will be
reported when we reach that offset during normal processing. | abstract protected int | fillCurrentChunk() Fill the current chunk the next buffer worth of data.
This method should replace any 0xD,0xA sequence with a single
0xA character, and replace single 0xD characters with a 0xA
character. | public boolean | lookingAtChar(char chr, boolean skipPastChar) | public boolean | lookingAtSpace(boolean skipPastChar) | public boolean | lookingAtValidChar(boolean skipPastChar) | public int | scanAttValue(char qchar, boolean asSymbol) | public int | scanCharRef(boolean hex) | public int | scanContent(QName element) | public int | scanEntityValue(int qchar, boolean createString) | public boolean | scanExpectedName(char fastcheck, StringPool.CharArrayRange expectedName) | public int | scanInvalidChar() | public int | scanName(char fastcheck) | public void | scanQName(char fastcheck, QName qname) | public int | scanStringLiteral() | public void | skipPastName(char fastcheck) | public void | skipPastNmtoken(char fastcheck) | public void | skipPastSpaces() | public void | skipToChar(char chr) | public boolean | skippedString(char[] s) |
fCurrentIndex | protected int fCurrentIndex(Code) | | |
fLength | protected int fLength(Code) | | |
fMostRecentChar | protected int fMostRecentChar(Code) | | |
fMostRecentData | protected char[] fMostRecentData(Code) | | |
AbstractCharReader | protected AbstractCharReader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, StringPool stringPool)(Code) | | Subclass constructor
Parameters: entityHandler - The entity handler. Parameters: errorReporter - The error reporter. Parameters: sendCharDataAsCharArray - true if char data should be reported usingchar arrays instead of string handles. Parameters: stringPool - The string pool. |
addString | public int addString(int offset, int length)(Code) | | Add a string to the StringPool from the characters scanned using this
reader as described by offset and length .
Parameters: offset - The offset within this reader where the characters start. Parameters: length - The length within this reader where the characters end. The StringPool handle for the string. |
addSymbol | public int addSymbol(int offset, int length)(Code) | | Add a symbol to the StringPool from the characters scanned using this
reader as described by offset and length .
Parameters: offset - The offset within this reader where the characters start. Parameters: length - The length within this reader where the characters end. The StringPool handle for the symbol. |
append | public void append(XMLEntityHandler.CharBuffer charBuffer, int offset, int length)(Code) | | Append the characters processed by this reader associated with offset and
length to the CharBuffer .
Parameters: charBuffer - The CharBuffer to append the characters to. Parameters: offset - The offset within this reader where the copy should start. Parameters: length - The length within this reader where the copy should stop. |
changeReaders | protected XMLEntityHandler.EntityReader changeReaders() throws Exception(Code) | | Change readers at end of input.
We override our superclass method to release the final chunk
of the input data before handing off to the next reader.
The next reader used to continue processing the document. |
deferException | protected void deferException(int errorCode, Object[] args, int offset)(Code) | | Delay reporting an error message.
If there is an error detected in the underlying input stream during
the fillCurrentChunk method, the error is described here and will be
reported when we reach that offset during normal processing. The
subclass should place a character with a value of zero at that offset,
which will be detected here as an invalid character. When the invalid
character is scanned, we will generate the deferred exception.
Parameters: errorCode - the errorCode to report Parameters: args - an array of arguments needed to generate a good error message Parameters: offset - the position in the reader where the error occured |
fillCurrentChunk | abstract protected int fillCurrentChunk() throws Exception(Code) | | Fill the current chunk the next buffer worth of data.
This method should replace any 0xD,0xA sequence with a single
0xA character, and replace single 0xD characters with a 0xA
character. This is described in the spec under section 2.11,
"End-of-Line Handling".
The value of the first character available for processing. exception: java.lang.Exception - |
lookingAtChar | public boolean lookingAtChar(char chr, boolean skipPastChar) throws Exception(Code) | | |
lookingAtSpace | public boolean lookingAtSpace(boolean skipPastChar) throws Exception(Code) | | |
lookingAtValidChar | public boolean lookingAtValidChar(boolean skipPastChar) throws Exception(Code) | | |
scanAttValue | public int scanAttValue(char qchar, boolean asSymbol) throws Exception(Code) | | |
scanEntityValue | public int scanEntityValue(int qchar, boolean createString) throws Exception(Code) | | |
skipPastName | public void skipPastName(char fastcheck) throws Exception(Code) | | |
skipPastNmtoken | public void skipPastNmtoken(char fastcheck) throws Exception(Code) | | |
|
|