gate.xml
Class StreamingCharFactory

java.lang.Object
  |
  +--org.apache.xerces.readers.DefaultReaderFactory
        |
        +--gate.xml.StreamingCharFactory
All Implemented Interfaces:
org.apache.xerces.readers.XMLEntityReaderFactory

public class StreamingCharFactory
extends org.apache.xerces.readers.DefaultReaderFactory

With this class the correct possition in the parsed XML document will be reported in the characters() callback function during the SAX parsing. You should set an instance of this class to the parser with the method setReaderFactory().
If you use default reader factory you will recieve zerro instead of correct position in the file.


Fields inherited from class org.apache.xerces.readers.DefaultReaderFactory
fAllowJavaEncodingName, fRecognizers, fSendCharDataAsCharArray, USE_BYTE_READER_FOR_UTF8, USE_CHAR_READER_FOR_UTF8
 
Constructor Summary
StreamingCharFactory()
           
 
Method Summary
 org.apache.xerces.readers.XMLEntityHandler.EntityReader createCharReader(org.apache.xerces.readers.XMLEntityHandler entityHandler, org.apache.xerces.framework.XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, Reader reader, org.apache.xerces.utils.StringPool stringPool)
           
 org.apache.xerces.readers.XMLEntityHandler.EntityReader createUTF8Reader(org.apache.xerces.readers.XMLEntityHandler entityHandler, org.apache.xerces.framework.XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, InputStream data, org.apache.xerces.utils.StringPool stringPool)
           
 
Methods inherited from class org.apache.xerces.readers.DefaultReaderFactory
addRecognizer, createReader, createStringReader, getAllowJavaEncodingName, setAllowJavaEncodingName, setSendCharDataAsCharArray
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

StreamingCharFactory

public StreamingCharFactory()
Method Detail

createCharReader

public org.apache.xerces.readers.XMLEntityHandler.EntityReader createCharReader(org.apache.xerces.readers.XMLEntityHandler entityHandler,
                                                                                org.apache.xerces.framework.XMLErrorReporter errorReporter,
                                                                                boolean sendCharDataAsCharArray,
                                                                                Reader reader,
                                                                                org.apache.xerces.utils.StringPool stringPool)
                                                                         throws Exception
Overrides:
createCharReader in class org.apache.xerces.readers.DefaultReaderFactory

createUTF8Reader

public org.apache.xerces.readers.XMLEntityHandler.EntityReader createUTF8Reader(org.apache.xerces.readers.XMLEntityHandler entityHandler,
                                                                                org.apache.xerces.framework.XMLErrorReporter errorReporter,
                                                                                boolean sendCharDataAsCharArray,
                                                                                InputStream data,
                                                                                org.apache.xerces.utils.StringPool stringPool)
                                                                         throws Exception
Overrides:
createUTF8Reader in class org.apache.xerces.readers.DefaultReaderFactory