Class InputFactoryImpl
- All Implemented Interfaces:
org.codehaus.stax2.XMLStreamProperties
XMLInputFactory and XMLInputFactory2)
as well as API for producing non-blocking (async) parsers
(that is, AsyncXMLInputFactory).-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XMLEventAllocator(package private) final ReaderConfigThis is the currently active configuration that will be used for readers created by this factory.Fields inherited from class org.codehaus.stax2.XMLInputFactory2
P_AUTO_CLOSE_INPUT, P_DTD_OVERRIDE, P_INTERN_NAMES, P_INTERN_NS_URIS, P_LAZY_PARSING, P_PRESERVE_LOCATION, P_REPORT_CDATA, P_REPORT_PROLOG_WHITESPACEFields inherited from class XMLInputFactory
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTDFields inherited from interface org.codehaus.stax2.XMLStreamProperties
XSP_IMPLEMENTATION_NAME, XSP_IMPLEMENTATION_VERSION, XSP_NAMESPACE_AWARE, XSP_PROBLEM_REPORTER, XSP_SUPPORT_XMLID, XSP_SUPPORTS_XML11, XSP_V_XMLID_FULL, XSP_V_XMLID_NONE, XSP_V_XMLID_TYPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidorg.codehaus.stax2.XMLEventReader2constructER(org.codehaus.stax2.XMLStreamReader2 sr) protected org.codehaus.stax2.XMLStreamReader2constructSR(File f, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR(InputStream in, String enc, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR(String systemId, InputStream in, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR(String systemId, Reader r, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR(URL src, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR(Source src, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2constructSR2(org.codehaus.stax2.io.Stax2Source ss, boolean forEventReader) createAsyncFor(byte[] input) Method for constructing a non-blockingXMLStreamReader2instance with specified initial input data.createAsyncFor(byte[] input, int offset, int length) Method for constructing a non-blockingXMLStreamReader2instance with specified initial input data.createAsyncFor(ByteBuffer input) Method for constructing a non-blockingXMLStreamReader2instance with specified initial input data.Method for constructing a non-blockingXMLStreamReader2instance without any input data.Method for constructing a non-blockingXMLStreamReader2instance without any input data.protected XMLEventAllocatorcreateFilteredReader(XMLEventReader reader, EventFilter filter) createFilteredReader(XMLStreamReader reader, StreamFilter filter) org.codehaus.stax2.XMLEventReader2createXMLEventReader(InputStream in, String enc) createXMLEventReader(String systemId, InputStream in) createXMLEventReader(String systemId, Reader r) org.codehaus.stax2.XMLEventReader2createXMLEventReader(URL src) createXMLEventReader(Source source) org.codehaus.stax2.XMLStreamReader2Convenience factory method that allows for parsing a document stored in the specified file.createXMLStreamReader(InputStream in, String enc) createXMLStreamReader(String systemId, InputStream in) createXMLStreamReader(String systemId, Reader r) org.codehaus.stax2.XMLStreamReader2createXMLStreamReader(URL src) getNonSharedConfig(String systemId, String publicId, String extEncoding, boolean forEventReader, boolean forceAutoClose) Method called when a non-shared copy of the current configuration is needed.getProperty(String name) booleanisPropertySupported(String name) voidsetEventAllocator(XMLEventAllocator allocator) voidsetProperty(String propName, Object value) voidvoidMethods inherited from class XMLInputFactory
newDefaultFactory, newFactory, newFactory, newInstance, newInstance
-
Field Details
-
_config
This is the currently active configuration that will be used for readers created by this factory. -
_allocator
-
-
Constructor Details
-
InputFactoryImpl
public InputFactoryImpl()
-
-
Method Details
-
createFilteredReader
- Specified by:
createFilteredReaderin classXMLInputFactory
-
createFilteredReader
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException - Specified by:
createFilteredReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, InputStream in) throws XMLStreamException - Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, InputStream in) throws XMLStreamException - Specified by:
createXMLStreamReaderin classXMLInputFactory- Throws:
XMLStreamException
-
getProperty
- Specified by:
getPropertyin classXMLInputFactory
-
setProperty
- Specified by:
setPropertyin classXMLInputFactory
-
getEventAllocator
- Specified by:
getEventAllocatorin classXMLInputFactory
-
getXMLReporter
- Specified by:
getXMLReporterin classXMLInputFactory
-
getXMLResolver
- Specified by:
getXMLResolverin classXMLInputFactory
-
isPropertySupported
- Specified by:
isPropertySupportedin classXMLInputFactory
-
setEventAllocator
- Specified by:
setEventAllocatorin classXMLInputFactory
-
setXMLReporter
- Specified by:
setXMLReporterin classXMLInputFactory
-
setXMLResolver
- Specified by:
setXMLResolverin classXMLInputFactory
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classorg.codehaus.stax2.XMLInputFactory2- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReaderin classorg.codehaus.stax2.XMLInputFactory2- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReaderin classorg.codehaus.stax2.XMLInputFactory2- Throws:
XMLStreamException
-
createXMLStreamReader
Convenience factory method that allows for parsing a document stored in the specified file.- Specified by:
createXMLStreamReaderin classorg.codehaus.stax2.XMLInputFactory2- Throws:
XMLStreamException
-
configureForXmlConformance
public void configureForXmlConformance()- Specified by:
configureForXmlConformancein classorg.codehaus.stax2.XMLInputFactory2
-
configureForConvenience
public void configureForConvenience()- Specified by:
configureForConveniencein classorg.codehaus.stax2.XMLInputFactory2
-
configureForSpeed
public void configureForSpeed()- Specified by:
configureForSpeedin classorg.codehaus.stax2.XMLInputFactory2
-
configureForLowMemUsage
public void configureForLowMemUsage()- Specified by:
configureForLowMemUsagein classorg.codehaus.stax2.XMLInputFactory2
-
configureForRoundTripping
public void configureForRoundTripping()- Specified by:
configureForRoundTrippingin classorg.codehaus.stax2.XMLInputFactory2
-
createAsyncForByteArray
Description copied from class:AsyncXMLInputFactoryMethod for constructing a non-blockingXMLStreamReader2instance without any input data.- Specified by:
createAsyncForByteArrayin classAsyncXMLInputFactory- Returns:
- Non-blocking stream reader without any input
-
createAsyncFor
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor(byte[] input) throws XMLStreamException Description copied from class:AsyncXMLInputFactoryMethod for constructing a non-blockingXMLStreamReader2instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.
- Specified by:
createAsyncForin classAsyncXMLInputFactory- Returns:
- Non-blocking stream reader initialized with given input
- Throws:
XMLStreamException
-
createAsyncFor
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor(byte[] input, int offset, int length) throws XMLStreamException Description copied from class:AsyncXMLInputFactoryMethod for constructing a non-blockingXMLStreamReader2instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.
- Specified by:
createAsyncForin classAsyncXMLInputFactory- Returns:
- Non-blocking stream reader initialized with given input
- Throws:
XMLStreamException
-
createAsyncForByteBuffer
Description copied from class:AsyncXMLInputFactoryMethod for constructing a non-blockingXMLStreamReader2instance without any input data.- Specified by:
createAsyncForByteBufferin classAsyncXMLInputFactory- Returns:
- Non-blocking stream reader without any input
-
createAsyncFor
public AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncFor(ByteBuffer input) throws XMLStreamException Description copied from class:AsyncXMLInputFactoryMethod for constructing a non-blockingXMLStreamReader2instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.
- Specified by:
createAsyncForin classAsyncXMLInputFactory- Returns:
- Non-blocking stream reader initialized with given input
- Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(InputStream in, String enc, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(String systemId, Reader r, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(String systemId, InputStream in, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(Source src, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR2
protected org.codehaus.stax2.XMLStreamReader2 constructSR2(org.codehaus.stax2.io.Stax2Source ss, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(URL src, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructSR
protected org.codehaus.stax2.XMLStreamReader2 constructSR(File f, boolean forEventReader) throws XMLStreamException - Throws:
XMLStreamException
-
constructER
public org.codehaus.stax2.XMLEventReader2 constructER(org.codehaus.stax2.XMLStreamReader2 sr) -
createEventAllocator
-