org.enhydra.apache.xerces.readers
Class UTF8CharReader

java.lang.Object
  |
  +--org.enhydra.apache.xerces.readers.XMLEntityReader
        |
        +--org.enhydra.apache.xerces.readers.AbstractCharReader
              |
              +--org.enhydra.apache.xerces.readers.UTF8CharReader
All Implemented Interfaces:
XMLEntityHandler.EntityReader

final class UTF8CharReader
extends AbstractCharReader

Simple character-based version of a UTF8 reader. This class is not commonly used, but is provided as a much simplified example of the UTF8Reader class that uses the AbstractCharReader to perform all of the reader functions except for filling each buffer of the character data when needed (fillCurrentChunk). We read the input data from an InputStream and perform end-of-line normalization as we process that data.

Version:
 

Fields inherited from class org.enhydra.apache.xerces.readers.AbstractCharReader
fCurrentChunk, fCurrentIndex, fLength, fMostRecentChar, fMostRecentData
 
Fields inherited from class org.enhydra.apache.xerces.readers.XMLEntityReader
fCarriageReturnCounter, fCharacterCounter, fCharDataHandler, fCurrentOffset, fEntityHandler, fErrorReporter, fInCDSect, fLinefeedCounter, fSendCharDataAsCharArray
 
Constructor Summary
(package private) UTF8CharReader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, InputStream dataStream, StringPool stringPool)
           
 
Method Summary
protected  int fillCurrentChunk()
          Fill the current chunk the next buffer worth of data.
 
Methods inherited from class org.enhydra.apache.xerces.readers.AbstractCharReader
addString, addSymbol, append, changeReaders, deferException, lookingAtChar, lookingAtSpace, lookingAtValidChar, scanAttValue, scanCharRef, scanContent, scanEntityValue, scanExpectedName, scanInvalidChar, scanName, scanQName, scanStringLiteral, skipPastName, skipPastNmtoken, skipPastSpaces, skippedString, skipToChar
 
Methods inherited from class org.enhydra.apache.xerces.readers.XMLEntityReader
currentOffset, getColumnNumber, getInCDSect, getLineNumber, init, setInCDSect
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UTF8CharReader

UTF8CharReader(XMLEntityHandler entityHandler,
               XMLErrorReporter errorReporter,
               boolean sendCharDataAsCharArray,
               InputStream dataStream,
               StringPool stringPool)
         throws Exception
Method Detail

fillCurrentChunk

protected int fillCurrentChunk()
                        throws Exception
Description copied from class: AbstractCharReader
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".
Overrides:
fillCurrentChunk in class AbstractCharReader
Following copied from class: org.enhydra.apache.xerces.readers.AbstractCharReader
Returns:
The value of the first character available for processing.
Throws:
Exception -  


Copyright © 1999 The Apache Software Foundation. All Rights reserved.