Top Description Fields Constructors Methods
com.fasterxml.aalto.stax

public final Class InputFactoryImpl

extends AsyncXMLInputFactory
Class Inheritance
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, .Reader, java.net.URL, java.nio.ByteBuffer, javax.xml.stream.*, javax.xml.stream.util.XMLEventAllocator, javax.xml.transform.dom.DOMSource, javax.xml.transform.sax.SAXSource, javax.xml.transform.stream.StreamSource, org.codehaus.stax2.XMLEventReader2, .XMLStreamReader2, org.codehaus.stax2.io.Stax2ByteArraySource, .Stax2CharArraySource, .Stax2Source, org.codehaus.stax2.ri.Stax2FilteredStreamReader, .Stax2ReaderAdapter, org.codehaus.stax2.ri.evt.Stax2EventReaderAdapter, .Stax2FilteredEventReader, org.xml.sax.InputSource, com.fasterxml.aalto.*, com.fasterxml.aalto.async.AsyncByteArrayScanner, .AsyncByteBufferScanner, .AsyncStreamReaderImpl, com.fasterxml.aalto.dom.DOMReaderImpl, com.fasterxml.aalto.evt.EventAllocatorImpl, .EventReaderImpl, com.fasterxml.aalto.impl.IoStreamException, com.fasterxml.aalto.in.*, com.fasterxml.aalto.util.URLUtil

Aalto implementation of basic Stax factory (both javax.xml.stream.XMLInputFactory and org.codehaus.stax2.XMLInputFactory2) as well as API for producing non-blocking (async) parsers (that is, AsyncXMLInputFactory).
Author
Tatu Saloranta

Field Summary

Modifier and TypeField and Description
protected XMLEventAllocator
pack-priv final ReaderConfig
_config

This is the currently active configuration that will be used for readers created by this factory.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
configureForConvenience()

Implements abstract org.codehaus.stax2.XMLInputFactory2.configureForConvenience.

Method to call to make Reader created be as "convenient" to use as possible; ie try to avoid having to deal with some of things like segmented text chunks.
public void
configureForLowMemUsage()

Implements abstract org.codehaus.stax2.XMLInputFactory2.configureForLowMemUsage.

Method to call to minimize the memory usage of the stream/event reader; both regarding Objects created, and the temporary memory usage during parsing.
public void
configureForRoundTripping()

Implements abstract org.codehaus.stax2.XMLInputFactory2.configureForRoundTripping.

Method to call to make Reader try to preserve as much of input formatting as possible, so that round-tripping would be as lossless as possible.
public void
configureForSpeed()

Implements abstract org.codehaus.stax2.XMLInputFactory2.configureForSpeed.

Method to call to make the Reader created be as fast as possible reading documents, especially for long-running processes where caching is likely to help.
public void
configureForXmlConformance()

Implements abstract org.codehaus.stax2.XMLInputFactory2.configureForXmlConformance.

Method to call to make Reader created conform as closely to XML standard as possible, doing all checks and transformations mandated by the XML specification (linefeed conversions, attr value normalizations).
public XMLEventReader2
protected XMLStreamReader2
constructSR(InputStream in, String enc, boolean forEventReader)

protected XMLStreamReader2
constructSR(String systemId, Reader r, boolean forEventReader)

protected XMLStreamReader2
constructSR(String systemId, InputStream in, boolean forEventReader)

protected XMLStreamReader2
constructSR(Source src, boolean forEventReader)

protected XMLStreamReader2
constructSR(URL src, boolean forEventReader)

protected XMLStreamReader2
constructSR(File f, boolean forEventReader)

protected XMLStreamReader2
constructSR2(Stax2Source ss, boolean forEventReader)

public AsyncXMLStreamReader<AsyncByteArrayFeeder>
createAsyncFor(byte[] input)

Implements abstract com.fasterxml.aalto.AsyncXMLInputFactory.createAsyncFor.

Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
public AsyncXMLStreamReader<AsyncByteArrayFeeder>
createAsyncFor(byte[] input, int offset, int length)

Implements abstract com.fasterxml.aalto.AsyncXMLInputFactory.createAsyncFor.

Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
public AsyncXMLStreamReader<AsyncByteBufferFeeder>
createAsyncFor(ByteBuffer input)

Implements abstract com.fasterxml.aalto.AsyncXMLInputFactory.createAsyncFor.

Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
public AsyncXMLStreamReader<AsyncByteArrayFeeder>
createAsyncForByteArray()

Implements abstract com.fasterxml.aalto.AsyncXMLInputFactory.createAsyncForByteArray.

Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
public AsyncXMLStreamReader<AsyncByteBufferFeeder>
createAsyncForByteBuffer()

Implements abstract com.fasterxml.aalto.AsyncXMLInputFactory.createAsyncForByteBuffer.

Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
protected XMLEventAllocator
public XMLEventReader
createFilteredReader(XMLEventReader
the event reader to wrap
reader
,
EventFilter
the filter to apply to the event reader
filter
)

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered event reader that wraps the filter around the event reader
public XMLStreamReader
createFilteredReader(XMLStreamReader
the reader to filter
reader
,
StreamFilter
the filter to apply to the reader
filter
)

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered reader that wraps the filter around the reader
public XMLEventReader
createXMLEventReader(InputStream
the InputStream to read from
in
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(InputStream
the InputStream to read from
in
,
String
the character encoding of the stream
enc
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(Reader
the XML data to read from
r
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.
public XMLEventReader
createXMLEventReader(Source
the source to read from
source
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a JAXP source.
public XMLEventReader
createXMLEventReader(String
the system ID of the stream
systemId
,
InputStream
the InputStream to read from
in
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(String
the system ID of the input
systemId
,
Reader
the XML data to read from
r
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.
public XMLEventReader
createXMLEventReader(XMLStreamReader
the XMLStreamReader to read from (may not be modified)
sr
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from an XMLStreamReader.
public XMLEventReader2
createXMLEventReader(URL src)

Implements abstract org.codehaus.stax2.XMLInputFactory2.createXMLEventReader.

Factory method that allows for parsing a document accessible via specified URL.
public XMLEventReader2
createXMLEventReader(File f)

Implements abstract org.codehaus.stax2.XMLInputFactory2.createXMLEventReader.

Convenience factory method that allows for parsing a document stored in the specified file.
public XMLStreamReader
createXMLStreamReader(InputStream
the InputStream to read from
in
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader
createXMLStreamReader(InputStream
the InputStream to read from
in
,
String
the character encoding of the stream
enc
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader
createXMLStreamReader(Reader
the XML data to read from
r
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a reader.
public XMLStreamReader
createXMLStreamReader(String
the system ID of the stream
systemId
,
Reader
the InputStream to read from
r
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader
createXMLStreamReader(Source
the source to read from
src
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a JAXP source.
public XMLStreamReader
createXMLStreamReader(String
the system ID of the stream
systemId
,
InputStream
the InputStream to read from
in
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader2
createXMLStreamReader(URL src)

Implements abstract org.codehaus.stax2.XMLInputFactory2.createXMLStreamReader.

Factory method that allows for parsing a document accessible via specified URL.
public XMLStreamReader2
createXMLStreamReader(File f)

Implements abstract org.codehaus.stax2.XMLInputFactory2.createXMLStreamReader.

Convenience factory method that allows for parsing a document stored in the specified file.
public XMLEventAllocator
getEventAllocator()

Implements abstract javax.xml.stream.XMLInputFactory.getEventAllocator.

Gets the allocator used by streams created with this factory
public 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.

public Object
getProperty(String
The name of the property (may not be null)
name
)

Implements abstract javax.xml.stream.XMLInputFactory.getProperty.

Get the value of a feature/property from the underlying implementation
public XMLReporter
getXMLReporter()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public XMLResolver
getXMLResolver()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public boolean
isPropertySupported(String
The name of the property (may not be null)
name
)

Implements abstract javax.xml.stream.XMLInputFactory.isPropertySupported.

Query the set of properties that this factory supports.
public void
setEventAllocator(XMLEventAllocator
the user defined allocator
allocator
)

Implements abstract javax.xml.stream.XMLInputFactory.setEventAllocator.

Set a user defined event allocator for events
public void
setProperty(String
The name of the property (may not be null)
propName
,
Object
The value of the property
value
)

Implements abstract javax.xml.stream.XMLInputFactory.setProperty.

Allows the user to set specific feature/property on the underlying implementation.
public void
setXMLReporter(XMLReporter
the resolver to use to report non fatal errors
r
)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public void
setXMLResolver(XMLResolver
the resolver to use to resolve references
r
)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.