public final class InputFactoryImpl extends AsyncXMLInputFactory
XMLInputFactory
and XMLInputFactory2
)
as well as API for producing non-blocking (async) parsers
(that is, AsyncXMLInputFactory
).Modifier and Type | Field and Description |
---|---|
protected XMLEventAllocator |
_allocator |
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
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
Constructor and Description |
---|
InputFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
configureForConvenience() |
void |
configureForLowMemUsage() |
void |
configureForRoundTripping() |
void |
configureForSpeed() |
void |
configureForXmlConformance() |
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(Source src,
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 |
constructSR2(org.codehaus.stax2.io.Stax2Source ss,
boolean forEventReader) |
AsyncXMLStreamReader<AsyncByteArrayFeeder> |
createAsyncFor(byte[] input)
Method for constructing a non-blocking
XMLStreamReader2 instance
with specified initial input data. |
AsyncXMLStreamReader<AsyncByteArrayFeeder> |
createAsyncFor(byte[] input,
int offset,
int length)
Method for constructing a non-blocking
XMLStreamReader2 instance
with specified initial input data. |
AsyncXMLStreamReader<AsyncByteBufferFeeder> |
createAsyncFor(ByteBuffer input)
Method for constructing a non-blocking
XMLStreamReader2 instance
with specified initial input data. |
AsyncXMLStreamReader<AsyncByteArrayFeeder> |
createAsyncForByteArray()
Method for constructing a non-blocking
XMLStreamReader2 instance
without any input data. |
AsyncXMLStreamReader<AsyncByteBufferFeeder> |
createAsyncForByteBuffer()
Method for constructing a non-blocking
XMLStreamReader2 instance
without any input data. |
protected XMLEventAllocator |
createEventAllocator() |
XMLEventReader |
createFilteredReader(XMLEventReader reader,
EventFilter filter) |
XMLStreamReader |
createFilteredReader(XMLStreamReader reader,
StreamFilter filter) |
org.codehaus.stax2.XMLEventReader2 |
createXMLEventReader(File f) |
XMLEventReader |
createXMLEventReader(InputStream in) |
XMLEventReader |
createXMLEventReader(InputStream in,
String enc) |
XMLEventReader |
createXMLEventReader(Reader r) |
XMLEventReader |
createXMLEventReader(Source source) |
XMLEventReader |
createXMLEventReader(String systemId,
InputStream in) |
XMLEventReader |
createXMLEventReader(String systemId,
Reader r) |
org.codehaus.stax2.XMLEventReader2 |
createXMLEventReader(URL src) |
XMLEventReader |
createXMLEventReader(XMLStreamReader sr) |
org.codehaus.stax2.XMLStreamReader2 |
createXMLStreamReader(File f)
Convenience factory method that allows for parsing a document
stored in the specified file.
|
XMLStreamReader |
createXMLStreamReader(InputStream in) |
XMLStreamReader |
createXMLStreamReader(InputStream in,
String enc) |
XMLStreamReader |
createXMLStreamReader(Reader r) |
XMLStreamReader |
createXMLStreamReader(Source src) |
XMLStreamReader |
createXMLStreamReader(String systemId,
InputStream in) |
XMLStreamReader |
createXMLStreamReader(String systemId,
Reader r) |
org.codehaus.stax2.XMLStreamReader2 |
createXMLStreamReader(URL src) |
XMLEventAllocator |
getEventAllocator() |
ReaderConfig |
getNonSharedConfig(String systemId,
String publicId,
String extEncoding,
boolean forEventReader,
boolean forceAutoClose)
Method called when a non-shared copy of the current configuration
is needed.
|
Object |
getProperty(String name) |
XMLReporter |
getXMLReporter() |
XMLResolver |
getXMLResolver() |
boolean |
isPropertySupported(String name) |
void |
setEventAllocator(XMLEventAllocator allocator) |
void |
setProperty(String propName,
Object value) |
void |
setXMLReporter(XMLReporter r) |
void |
setXMLResolver(XMLResolver r) |
newFactory, newFactory, newInstance, newInstance
protected XMLEventAllocator _allocator
public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter)
createFilteredReader
in class XMLInputFactory
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException
createFilteredReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(InputStream in, String enc) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(Reader r) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(String systemId, InputStream in) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(String systemId, Reader r) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createXMLEventReader(XMLStreamReader sr) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(InputStream in) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(InputStream in, String enc) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(Reader r) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(String systemId, Reader r) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(Source src) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public XMLStreamReader createXMLStreamReader(String systemId, InputStream in) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public Object getProperty(String name)
getProperty
in class XMLInputFactory
public void setProperty(String propName, Object value)
setProperty
in class XMLInputFactory
public XMLEventAllocator getEventAllocator()
getEventAllocator
in class XMLInputFactory
public XMLReporter getXMLReporter()
getXMLReporter
in class XMLInputFactory
public XMLResolver getXMLResolver()
getXMLResolver
in class XMLInputFactory
public boolean isPropertySupported(String name)
isPropertySupported
in class XMLInputFactory
public void setEventAllocator(XMLEventAllocator allocator)
setEventAllocator
in class XMLInputFactory
public void setXMLReporter(XMLReporter r)
setXMLReporter
in class XMLInputFactory
public void setXMLResolver(XMLResolver r)
setXMLResolver
in class XMLInputFactory
public org.codehaus.stax2.XMLEventReader2 createXMLEventReader(URL src) throws XMLStreamException
createXMLEventReader
in class org.codehaus.stax2.XMLInputFactory2
XMLStreamException
public org.codehaus.stax2.XMLEventReader2 createXMLEventReader(File f) throws XMLStreamException
createXMLEventReader
in class org.codehaus.stax2.XMLInputFactory2
XMLStreamException
public org.codehaus.stax2.XMLStreamReader2 createXMLStreamReader(URL src) throws XMLStreamException
createXMLStreamReader
in class org.codehaus.stax2.XMLInputFactory2
XMLStreamException
public org.codehaus.stax2.XMLStreamReader2 createXMLStreamReader(File f) throws XMLStreamException
createXMLStreamReader
in class org.codehaus.stax2.XMLInputFactory2
XMLStreamException
public void configureForXmlConformance()
configureForXmlConformance
in class org.codehaus.stax2.XMLInputFactory2
public void configureForConvenience()
configureForConvenience
in class org.codehaus.stax2.XMLInputFactory2
public void configureForSpeed()
configureForSpeed
in class org.codehaus.stax2.XMLInputFactory2
public void configureForLowMemUsage()
configureForLowMemUsage
in class org.codehaus.stax2.XMLInputFactory2
public void configureForRoundTripping()
configureForRoundTripping
in class org.codehaus.stax2.XMLInputFactory2
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncForByteArray()
AsyncXMLInputFactory
XMLStreamReader2
instance
without any input data.createAsyncForByteArray
in class AsyncXMLInputFactory
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor(byte[] input) throws XMLStreamException
AsyncXMLInputFactory
XMLStreamReader2
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.
createAsyncFor
in class AsyncXMLInputFactory
XMLStreamException
public AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor(byte[] input, int offset, int length) throws XMLStreamException
AsyncXMLInputFactory
XMLStreamReader2
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.
createAsyncFor
in class AsyncXMLInputFactory
XMLStreamException
public AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncForByteBuffer()
AsyncXMLInputFactory
XMLStreamReader2
instance
without any input data.createAsyncForByteBuffer
in class AsyncXMLInputFactory
public AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncFor(ByteBuffer input) throws XMLStreamException
AsyncXMLInputFactory
XMLStreamReader2
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.
createAsyncFor
in class AsyncXMLInputFactory
XMLStreamException
public ReaderConfig getNonSharedConfig(String systemId, String publicId, String extEncoding, boolean forEventReader, boolean forceAutoClose)
protected org.codehaus.stax2.XMLStreamReader2 constructSR(InputStream in, String enc, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR(String systemId, Reader r, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR(String systemId, InputStream in, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR(Source src, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR2(org.codehaus.stax2.io.Stax2Source ss, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR(URL src, boolean forEventReader) throws XMLStreamException
XMLStreamException
protected org.codehaus.stax2.XMLStreamReader2 constructSR(File f, boolean forEventReader) throws XMLStreamException
XMLStreamException
public org.codehaus.stax2.XMLEventReader2 constructER(org.codehaus.stax2.XMLStreamReader2 sr)
protected XMLEventAllocator createEventAllocator()
Copyright © 2019 FasterXML. All rights reserved.