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 ReaderConfig
This 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_WHITESPACE
Fields inherited from class javax.xml.stream.XMLInputFactory
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
Fields 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 TypeMethodDescriptionvoid
void
void
void
void
org.codehaus.stax2.XMLEventReader2
constructER
(org.codehaus.stax2.XMLStreamReader2 sr) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(File f, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(InputStream in, String enc, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(String systemId, InputStream in, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(String systemId, Reader r, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(URL src, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR
(Source src, boolean forEventReader) protected org.codehaus.stax2.XMLStreamReader2
constructSR2
(org.codehaus.stax2.io.Stax2Source ss, boolean forEventReader) createAsyncFor
(byte[] input) Method for constructing a non-blockingXMLStreamReader2
instance with specified initial input data.createAsyncFor
(byte[] input, int offset, int length) Method for constructing a non-blockingXMLStreamReader2
instance with specified initial input data.createAsyncFor
(ByteBuffer input) Method for constructing a non-blockingXMLStreamReader2
instance with specified initial input data.Method for constructing a non-blockingXMLStreamReader2
instance without any input data.Method for constructing a non-blockingXMLStreamReader2
instance without any input data.protected XMLEventAllocator
createFilteredReader
(XMLEventReader reader, EventFilter filter) createFilteredReader
(XMLStreamReader reader, StreamFilter filter) org.codehaus.stax2.XMLEventReader2
createXMLEventReader
(InputStream in, String enc) createXMLEventReader
(String systemId, InputStream in) createXMLEventReader
(String systemId, Reader r) org.codehaus.stax2.XMLEventReader2
createXMLEventReader
(URL src) createXMLEventReader
(Source source) org.codehaus.stax2.XMLStreamReader2
Convenience 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.XMLStreamReader2
createXMLStreamReader
(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) boolean
isPropertySupported
(String name) void
setEventAllocator
(XMLEventAllocator allocator) void
setProperty
(String propName, Object value) void
void
Methods inherited from class javax.xml.stream.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:
createFilteredReader
in classXMLInputFactory
-
createFilteredReader
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException - Specified by:
createFilteredReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(String systemId, InputStream in) throws XMLStreamException - Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
createXMLStreamReader
public XMLStreamReader createXMLStreamReader(String systemId, InputStream in) throws XMLStreamException - Specified by:
createXMLStreamReader
in classXMLInputFactory
- Throws:
XMLStreamException
-
getProperty
- Specified by:
getProperty
in classXMLInputFactory
-
setProperty
- Specified by:
setProperty
in classXMLInputFactory
-
getEventAllocator
- Specified by:
getEventAllocator
in classXMLInputFactory
-
getXMLReporter
- Specified by:
getXMLReporter
in classXMLInputFactory
-
getXMLResolver
- Specified by:
getXMLResolver
in classXMLInputFactory
-
isPropertySupported
- Specified by:
isPropertySupported
in classXMLInputFactory
-
setEventAllocator
- Specified by:
setEventAllocator
in classXMLInputFactory
-
setXMLReporter
- Specified by:
setXMLReporter
in classXMLInputFactory
-
setXMLResolver
- Specified by:
setXMLResolver
in classXMLInputFactory
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classorg.codehaus.stax2.XMLInputFactory2
- Throws:
XMLStreamException
-
createXMLEventReader
- Specified by:
createXMLEventReader
in classorg.codehaus.stax2.XMLInputFactory2
- Throws:
XMLStreamException
-
createXMLStreamReader
- Specified by:
createXMLStreamReader
in classorg.codehaus.stax2.XMLInputFactory2
- Throws:
XMLStreamException
-
createXMLStreamReader
Convenience factory method that allows for parsing a document stored in the specified file.- Specified by:
createXMLStreamReader
in classorg.codehaus.stax2.XMLInputFactory2
- Throws:
XMLStreamException
-
configureForXmlConformance
public void configureForXmlConformance()- Specified by:
configureForXmlConformance
in classorg.codehaus.stax2.XMLInputFactory2
-
configureForConvenience
public void configureForConvenience()- Specified by:
configureForConvenience
in classorg.codehaus.stax2.XMLInputFactory2
-
configureForSpeed
public void configureForSpeed()- Specified by:
configureForSpeed
in classorg.codehaus.stax2.XMLInputFactory2
-
configureForLowMemUsage
public void configureForLowMemUsage()- Specified by:
configureForLowMemUsage
in classorg.codehaus.stax2.XMLInputFactory2
-
configureForRoundTripping
public void configureForRoundTripping()- Specified by:
configureForRoundTripping
in classorg.codehaus.stax2.XMLInputFactory2
-
createAsyncForByteArray
Description copied from class:AsyncXMLInputFactory
Method for constructing a non-blockingXMLStreamReader2
instance without any input data.- Specified by:
createAsyncForByteArray
in classAsyncXMLInputFactory
- Returns:
- Non-blocking stream reader without any input
-
createAsyncFor
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor(byte[] input) throws XMLStreamException Description copied from class:AsyncXMLInputFactory
Method for constructing a non-blockingXMLStreamReader2
instance 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:
createAsyncFor
in 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:AsyncXMLInputFactory
Method for constructing a non-blockingXMLStreamReader2
instance 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:
createAsyncFor
in classAsyncXMLInputFactory
- Returns:
- Non-blocking stream reader initialized with given input
- Throws:
XMLStreamException
-
createAsyncForByteBuffer
Description copied from class:AsyncXMLInputFactory
Method for constructing a non-blockingXMLStreamReader2
instance without any input data.- Specified by:
createAsyncForByteBuffer
in classAsyncXMLInputFactory
- Returns:
- Non-blocking stream reader without any input
-
createAsyncFor
public AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncFor(ByteBuffer input) throws XMLStreamException Description copied from class:AsyncXMLInputFactory
Method for constructing a non-blockingXMLStreamReader2
instance 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:
createAsyncFor
in 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
-