org.enhydra.apache.xerces.readers
Class DefaultReaderFactory

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

public class DefaultReaderFactory
extends Object
implements XMLEntityReaderFactory


Constructor Summary
DefaultReaderFactory()
          Constructor
 
Method Summary
 void addRecognizer(XMLDeclRecognizer recognizer)
          Adds a recognizer.
 XMLEntityHandler.EntityReader createCharReader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, Reader reader, StringPool stringPool)
          Create an entity reader for a character stream.
 XMLEntityHandler.EntityReader createReader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, InputSource source, String systemId, boolean xmlDecl, StringPool stringPool)
          Create a reader
 XMLEntityHandler.EntityReader createStringReader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, int lineNumber, int columnNumber, int stringHandle, StringPool stringPool, boolean addEnclosingSpaces)
          Create an entity reader for data from a String.
 XMLEntityHandler.EntityReader createUTF8Reader(XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, InputStream data, StringPool stringPool)
          Create an entity reader for a byte stream encoded in UTF-8.
 boolean getAllowJavaEncodingName()
           
 void setAllowJavaEncodingName(boolean flag)
           
 void setSendCharDataAsCharArray(boolean flag)
          Set char data processing preference.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReaderFactory

public DefaultReaderFactory()
Constructor
Method Detail

addRecognizer

public void addRecognizer(XMLDeclRecognizer recognizer)
Adds a recognizer.
Specified by:
addRecognizer in interface XMLEntityReaderFactory
Parameters:
recognizer - The XML recognizer to add.

setSendCharDataAsCharArray

public void setSendCharDataAsCharArray(boolean flag)
Set char data processing preference.
Specified by:
setSendCharDataAsCharArray in interface XMLEntityReaderFactory

setAllowJavaEncodingName

public void setAllowJavaEncodingName(boolean flag)
Specified by:
setAllowJavaEncodingName in interface XMLEntityReaderFactory

getAllowJavaEncodingName

public boolean getAllowJavaEncodingName()
Specified by:
getAllowJavaEncodingName in interface XMLEntityReaderFactory

createReader

public XMLEntityHandler.EntityReader createReader(XMLEntityHandler entityHandler,
                                                  XMLErrorReporter errorReporter,
                                                  InputSource source,
                                                  String systemId,
                                                  boolean xmlDecl,
                                                  StringPool stringPool)
                                           throws Exception
Create a reader
Specified by:
createReader in interface XMLEntityReaderFactory
Following copied from interface: org.enhydra.apache.xerces.readers.XMLEntityReaderFactory
Parameters:
source - The input source.
systemId - The system identifier for the input.
xmlDecl - true if an XMLDecl may be present; otherwise false if a TextDecl may be present.
stringPool - The string pool.
Returns:
The reader that will process the source.
Throws:
Exception -  

createCharReader

public XMLEntityHandler.EntityReader createCharReader(XMLEntityHandler entityHandler,
                                                      XMLErrorReporter errorReporter,
                                                      boolean sendCharDataAsCharArray,
                                                      Reader reader,
                                                      StringPool stringPool)
                                               throws Exception
Create an entity reader for a character stream.
Specified by:
createCharReader in interface XMLEntityReaderFactory
Parameters:
enityHandler - The entity handler.
errorReporter - The error reporter.
sendCharDataAsCharArray - true if char data should be reported using char arrays instead of string handles.
reader - The character stream.
stringPool - The string pool.
Returns:
The reader that will process the character data.
Throws:
Exception -  

createUTF8Reader

public XMLEntityHandler.EntityReader createUTF8Reader(XMLEntityHandler entityHandler,
                                                      XMLErrorReporter errorReporter,
                                                      boolean sendCharDataAsCharArray,
                                                      InputStream data,
                                                      StringPool stringPool)
                                               throws Exception
Create an entity reader for a byte stream encoded in UTF-8.
Specified by:
createUTF8Reader in interface XMLEntityReaderFactory
Parameters:
enityHandler - The entity handler.
errorReporter - The error reporter.
sendCharDataAsCharArray - true if char data should be reported using char arrays instead of string handles.
data - The byte stream.
stringPool - The string pool.
Returns:
The reader that will process the UTF-8 data.
Throws:
Exception -  

createStringReader

public XMLEntityHandler.EntityReader createStringReader(XMLEntityHandler entityHandler,
                                                        XMLErrorReporter errorReporter,
                                                        boolean sendCharDataAsCharArray,
                                                        int lineNumber,
                                                        int columnNumber,
                                                        int stringHandle,
                                                        StringPool stringPool,
                                                        boolean addEnclosingSpaces)
                                                 throws Exception
Create an entity reader for data from a String.
Specified by:
createStringReader in interface XMLEntityReaderFactory
Parameters:
entityHandler - The current entity handler.
errorReporter - The current error reporter.
sendCharDataAsCharArray - true if char data should be reported using char arrays instead of string handles.
lineNumber - The line number to return as our position.
columnNumber - The column number to return as our position.
stringHandle - The StringPool handle for the data to process.
stringPool - The string pool.
addEnclosingSpaces - If true, treat the data to process as if there were a leading and trailing space character enclosing the string data.
Returns:
The reader that will process the string data.
Throws:
Exception -  


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