|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xerces.readers.XMLDeclRecognizer
Abstract base class for encoding recognizers. When we encounter an external entity, including the document entity, and do not know what the encoding of the underlying byte stream is, we need to look at the contents of the stream to find out. We do this by asking a set of "recognizers" to look at the stream data and if the recognizer can understand the encoding it will try to read an XML or text declaration, if present, and construct the appropriate reader for that encoding. The recognizer subclasses will typically use the prescanXMLDeclOrTextDecl() method if the stream looks like it does begin with such a declaration using a temporary reader that can support the calls needed to scan through the encoding declaration.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Constructor Summary | |
XMLDeclRecognizer()
|
Method Summary | |
protected int |
prescanXMLDeclOrTextDecl(XMLEntityHandler.EntityReader entityReader,
boolean xmlDecl)
Support for getting the value of an EncodingDecl using an XMLReader. |
abstract XMLEntityHandler.EntityReader |
recognize(XMLEntityReaderFactory readerFactory,
XMLEntityHandler entityHandler,
XMLErrorReporter errorReporter,
boolean sendCharDataAsCharArray,
StringPool stringPool,
ChunkyByteArray data,
boolean xmlDecl,
boolean allowJavaEncodingName)
Subclasses override this method to support recognizing their encodings. |
static void |
registerDefaultRecognizers(java.util.Stack recognizerStack)
Register the standard recognizers. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XMLDeclRecognizer()
Method Detail |
public static void registerDefaultRecognizers(java.util.Stack recognizerStack)
recognizerStack
- The stack of recognizers used by the parser.public abstract XMLEntityHandler.EntityReader recognize(XMLEntityReaderFactory readerFactory, XMLEntityHandler entityHandler, XMLErrorReporter errorReporter, boolean sendCharDataAsCharArray, StringPool stringPool, ChunkyByteArray data, boolean xmlDecl, boolean allowJavaEncodingName) throws java.lang.Exception
readerFactory
- the factory object to use when constructing the entity reader.entityHandler
- the entity handler to get entity readers fromerrorReporter
- where to report errorssendCharDataAsCharArray
- true if the reader should use char arrays, not string handles.stringPool
- the StringPool
to put strings indata
- initial bytes to perform recognition onxmlDecl
- true if attempting to recognize fron an XMLDecl, false if trying to recognize from a TextDecl.allowJavaEncodingName
- true if Java's encoding names are allowed, false if they are not.protected int prescanXMLDeclOrTextDecl(XMLEntityHandler.EntityReader entityReader, boolean xmlDecl) throws java.lang.Exception
entityReader
- data source for prescanxmlDecl
- true if attempting to recognize from an XMLDecl, false if trying to recognize from a TextDecl.StringPool
handle to the name of the encoding recognized
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |