FastInfosetParser, FastInfosetReader, org.xml.sax.XMLReaderpublic class SAXDocumentParser extends Decoder implements FastInfosetReader
Instantiate this parser to parse a fast infoset document in accordance with the SAX API.
More than one fast infoset document may be decoded from the
InputStream.
Decoder.EncodingAlgorithmInputStream| Modifier and Type | Field | Description |
|---|---|---|
protected EncodingAlgorithmContentHandler |
_algorithmHandler |
|
protected AttributesHolder |
_attributes |
|
protected boolean |
_clearAttributes |
|
protected org.xml.sax.ContentHandler |
_contentHandler |
Reference to content handler.
|
protected org.xml.sax.ext.DeclHandler |
_declHandler |
Reference to DTD declaration handler.
|
protected org.xml.sax.DTDHandler |
_dtdHandler |
Reference to dtd handler.
|
protected org.xml.sax.EntityResolver |
_entityResolver |
Reference to entity resolver.
|
protected org.xml.sax.ErrorHandler |
_errorHandler |
Reference to error handler.
|
protected org.xml.sax.ext.LexicalHandler |
_lexicalHandler |
Reference to lexical handler.
|
protected int[] |
_namespacePrefixes |
|
protected boolean |
_namespacePrefixesFeature |
SAX Namespace attributes features
|
protected int |
_namespacePrefixesIndex |
|
protected PrimitiveTypeContentHandler |
_primitiveHandler |
|
protected BuiltInEncodingAlgorithmState |
builtInAlgorithmState |
_addToTable, _attributeNameTable, _attributeValueTable, _b, _bufferSize, _characterContentChunkTable, _charBuffer, _charBufferLength, _doubleTerminate, _duplicateAttributeVerifier, _elementNameTable, _identifier, _integer, _namespaceNameIndex, _needForceStreamClose, _notations, _octetBuffer, _octetBufferEnd, _octetBufferLength, _octetBufferOffset, _octetBufferStart, _parseFragments, _prefixIndex, _prefixTable, _registeredEncodingAlgorithms, _terminate, _unparsedEntities, _v, BUFFER_SIZE_SYSTEM_PROPERTY, NISTRING_EMPTY_STRING, NISTRING_ENCODING_ALGORITHM, NISTRING_INDEX, NISTRING_STRING, STRING_INTERNING_SYSTEM_PROPERTYBUFFER_SIZE_PROPERTY, EXTERNAL_VOCABULARIES_PROPERTY, FORCE_STREAM_CLOSE_PROPERTY, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, STRING_INTERNING_PROPERTYENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY, PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY| Constructor | Description |
|---|---|
SAXDocumentParser() |
Creates a new instance of DocumetParser2
|
| Modifier and Type | Method | Description |
|---|---|---|
org.xml.sax.ContentHandler |
getContentHandler() |
|
org.xml.sax.ext.DeclHandler |
getDeclHandler() |
Return the current DTD declaration handler.
|
org.xml.sax.DTDHandler |
getDTDHandler() |
|
EncodingAlgorithmContentHandler |
getEncodingAlgorithmContentHandler() |
Return the current encoding algorithm handler.
|
org.xml.sax.EntityResolver |
getEntityResolver() |
|
org.xml.sax.ErrorHandler |
getErrorHandler() |
|
boolean |
getFeature(java.lang.String name) |
|
org.xml.sax.ext.LexicalHandler |
getLexicalHandler() |
Return the current lexical handler.
|
PrimitiveTypeContentHandler |
getPrimitiveTypeContentHandler() |
Return the current primitive type handler.
|
java.lang.Object |
getProperty(java.lang.String name) |
|
void |
parse() |
|
void |
parse(java.io.InputStream s) |
Parse a fast infoset document from an InputStream.
|
void |
parse(java.lang.String systemId) |
|
void |
parse(org.xml.sax.InputSource input) |
|
protected void |
processAIIEncodingAlgorithm(QualifiedName name,
boolean addToTable) |
|
protected void |
processAIIs() |
|
protected void |
processBuiltInEncodingAlgorithmAsCharacters(java.lang.StringBuffer buffer) |
|
protected java.lang.Object |
processBuiltInEncodingAlgorithmAsObject() |
|
protected void |
processCIIBuiltInEncodingAlgorithmAsPrimitive() |
|
protected void |
processCIIEncodingAlgorithm(boolean addToTable) |
|
protected void |
processCommentII() |
|
protected void |
processDII() |
|
protected void |
processDIIFragment() |
|
protected void |
processDIIOptionalProperties() |
|
protected void |
processEII(QualifiedName name,
boolean hasAttributes) |
|
protected void |
processEIIWithNamespaces() |
|
protected void |
processProcessingII() |
|
protected void |
resetOnError() |
|
void |
setContentHandler(org.xml.sax.ContentHandler handler) |
|
void |
setDeclHandler(org.xml.sax.ext.DeclHandler handler) |
Allow an application to register a DTD declaration handler.
|
void |
setDTDHandler(org.xml.sax.DTDHandler handler) |
|
void |
setEncodingAlgorithmContentHandler(EncodingAlgorithmContentHandler handler) |
Allow an application to register an encoding algorithm handler.
|
void |
setEntityResolver(org.xml.sax.EntityResolver resolver) |
|
void |
setErrorHandler(org.xml.sax.ErrorHandler handler) |
|
void |
setFeature(java.lang.String name,
boolean value) |
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler) |
Allow an application to register a lexical handler.
|
void |
setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) |
Allow an application to register a primitive type handler.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
_isFastInfosetDocument, closeIfRequired, createQualifiedNameString, createQualifiedNameString, decodeAdditionalData, decodeAlphabetOctetsAsCharBuffer, decodeCharacterEncodingScheme, decodeDII, decodeEIIIndexLarge, decodeEIIIndexMedium, decodeFourBitAlphabetOctetsAsCharBuffer, decodeHeader, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix, decodeIdentifyingNonEmptyStringOnFirstBit, decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix, decodeInitialVocabulary, decodeIntegerIndexOnSecondBit, decodeLiteralQualifiedName, decodeNonEmptyOctetStringLengthOnSecondBit, decodeNonEmptyOctetStringOnSecondBitAsUtf8CharArray, decodeNonEmptyOctetStringOnSecondBitAsUtf8String, decodeNonIdentifyingStringOnFirstBit, decodeNotations, decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit, decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit, decodeRAOctetsAsString, decodeRestrictedAlphabetAsCharBuffer, decodeRestrictedAlphabetAsString, decodeUnparsedEntities, decodeUtf16StringAsCharBuffer, decodeUtf16StringAsString, decodeUtf8NCNameIntoCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsString, decodeUtf8StringIntoCharBuffer, decodeUtf8StringIntoCharBuffer, decodeVersion, getBufferSize, getExternalVocabularies, getForceStreamClose, getParseFragments, getRegisteredEncodingAlgorithms, getStringInterning, isFastInfosetDocument, peek, peek, peek2, read, reset, setBufferSize, setExternalVocabularies, setForceStreamClose, setInputStream, setParseFragments, setRegisteredEncodingAlgorithms, setStringInterning, setVocabularygetBufferSize, getExternalVocabularies, getForceStreamClose, getParseFragments, getRegisteredEncodingAlgorithms, getStringInterning, setBufferSize, setExternalVocabularies, setForceStreamClose, setParseFragments, setRegisteredEncodingAlgorithms, setStringInterningprotected boolean _namespacePrefixesFeature
protected org.xml.sax.EntityResolver _entityResolver
protected org.xml.sax.DTDHandler _dtdHandler
protected org.xml.sax.ContentHandler _contentHandler
protected org.xml.sax.ErrorHandler _errorHandler
protected org.xml.sax.ext.LexicalHandler _lexicalHandler
protected org.xml.sax.ext.DeclHandler _declHandler
protected EncodingAlgorithmContentHandler _algorithmHandler
protected PrimitiveTypeContentHandler _primitiveHandler
protected BuiltInEncodingAlgorithmState builtInAlgorithmState
protected AttributesHolder _attributes
protected int[] _namespacePrefixes
protected int _namespacePrefixesIndex
protected boolean _clearAttributes
public SAXDocumentParser()
protected void resetOnError()
public boolean getFeature(java.lang.String name)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
getFeature in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic void setFeature(java.lang.String name,
boolean value)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setFeature in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic java.lang.Object getProperty(java.lang.String name)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
getProperty in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic void setProperty(java.lang.String name,
java.lang.Object value)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setProperty in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver in interface org.xml.sax.XMLReaderpublic org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver in interface org.xml.sax.XMLReaderpublic void setDTDHandler(org.xml.sax.DTDHandler handler)
setDTDHandler in interface org.xml.sax.XMLReaderpublic org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler in interface org.xml.sax.XMLReaderpublic void setContentHandler(org.xml.sax.ContentHandler handler)
setContentHandler in interface org.xml.sax.XMLReaderpublic org.xml.sax.ContentHandler getContentHandler()
getContentHandler in interface org.xml.sax.XMLReaderpublic void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler in interface org.xml.sax.XMLReaderpublic org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler in interface org.xml.sax.XMLReaderpublic void parse(org.xml.sax.InputSource input)
throws java.io.IOException,
org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderjava.io.IOExceptionorg.xml.sax.SAXExceptionpublic void parse(java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderjava.io.IOExceptionorg.xml.sax.SAXExceptionpublic final void parse(java.io.InputStream s)
throws java.io.IOException,
FastInfosetException,
org.xml.sax.SAXException
FastInfosetReaderThe application can use this method to instruct the Fast Infoset reader to begin parsing a fast infoset document from a byte stream.
Applications may not invoke this method while a parse is in progress (they should create a new XMLReader instead for each nested XML document). Once a parse is complete, an application may reuse the same FastInfosetReader object, possibly with a different byte stream.
During the parse, the FastInfosetReader will provide information about the fast infoset document through the registered event handlers.
This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.
parse in interface FastInfosetReaders - The byte stream to parse from.java.io.IOExceptionFastInfosetExceptionorg.xml.sax.SAXExceptionpublic void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
FastInfosetReaderApplications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setLexicalHandler in interface FastInfosetReaderhandler - The lexical handler.FastInfosetReader.getLexicalHandler()public org.xml.sax.ext.LexicalHandler getLexicalHandler()
FastInfosetReadergetLexicalHandler in interface FastInfosetReaderFastInfosetReader.setLexicalHandler(org.xml.sax.ext.LexicalHandler)public void setDeclHandler(org.xml.sax.ext.DeclHandler handler)
FastInfosetReaderApplications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setDeclHandler in interface FastInfosetReaderhandler - The DTD declaration handler.FastInfosetReader.getLexicalHandler()public org.xml.sax.ext.DeclHandler getDeclHandler()
FastInfosetReadergetDeclHandler in interface FastInfosetReaderFastInfosetReader.setLexicalHandler(org.xml.sax.ext.LexicalHandler)public void setEncodingAlgorithmContentHandler(EncodingAlgorithmContentHandler handler)
FastInfosetReaderApplications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setEncodingAlgorithmContentHandler in interface FastInfosetReaderhandler - The encoding algorithm handler.FastInfosetReader.getEncodingAlgorithmContentHandler()public EncodingAlgorithmContentHandler getEncodingAlgorithmContentHandler()
FastInfosetReadergetEncodingAlgorithmContentHandler in interface FastInfosetReaderFastInfosetReader.setEncodingAlgorithmContentHandler(org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler)public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler)
FastInfosetReaderApplications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setPrimitiveTypeContentHandler in interface FastInfosetReaderhandler - The primitive type handler.FastInfosetReader.getPrimitiveTypeContentHandler()public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler()
FastInfosetReadergetPrimitiveTypeContentHandler in interface FastInfosetReaderFastInfosetReader.setPrimitiveTypeContentHandler(org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler)public final void parse()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processDII()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processDIIFragment()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processDIIOptionalProperties()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processEII(QualifiedName name, boolean hasAttributes) throws FastInfosetException, java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processEIIWithNamespaces()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processAIIs()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processCommentII()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processProcessingII()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processCIIEncodingAlgorithm(boolean addToTable)
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processCIIBuiltInEncodingAlgorithmAsPrimitive()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable) throws FastInfosetException, java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final void processBuiltInEncodingAlgorithmAsCharacters(java.lang.StringBuffer buffer)
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionprotected final java.lang.Object processBuiltInEncodingAlgorithmAsObject()
throws FastInfosetException,
java.io.IOException
FastInfosetExceptionjava.io.IOExceptionCopyright © 2018 Oracle Corporation. All rights reserved.