| Method from javax.xml.stream.XMLInputFactory Detail: |
abstract public XMLStreamReader createFilteredReader(XMLStreamReader reader,
StreamFilter filter) throws XMLStreamException
Create a filtered reader that wraps the filter around the reader |
abstract public XMLEventReader createFilteredReader(XMLEventReader reader,
EventFilter filter) throws XMLStreamException
Create a filtered event reader that wraps the filter around the event reader |
abstract public XMLEventReader createXMLEventReader(Reader reader) throws XMLStreamException
Create a new XMLEventReader from a reader |
abstract public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
Create a new XMLEventReader from an XMLStreamReader. After being used
to construct the XMLEventReader instance returned from this method
the XMLStreamReader must not be used. |
abstract public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException
Create a new XMLEventReader from a JAXP source.
Support of this method is optional. |
abstract public XMLEventReader createXMLEventReader(InputStream stream) throws XMLStreamException
Create a new XMLEventReader from a java.io.InputStream |
abstract public XMLEventReader createXMLEventReader(String systemId,
Reader reader) throws XMLStreamException
Create a new XMLEventReader from a reader |
abstract public XMLEventReader createXMLEventReader(InputStream stream,
String encoding) throws XMLStreamException
Create a new XMLEventReader from a java.io.InputStream |
abstract public XMLEventReader createXMLEventReader(String systemId,
InputStream stream) throws XMLStreamException
Create a new XMLEventReader from a java.io.InputStream |
abstract public XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
Create a new XMLStreamReader from a reader |
abstract public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException
Create a new XMLStreamReader from a JAXP source. This method is optional. |
abstract public XMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
Create a new XMLStreamReader from a java.io.InputStream |
abstract public XMLStreamReader createXMLStreamReader(InputStream stream,
String encoding) throws XMLStreamException
Create a new XMLStreamReader from a java.io.InputStream |
abstract public XMLStreamReader createXMLStreamReader(String systemId,
InputStream stream) throws XMLStreamException
Create a new XMLStreamReader from a java.io.InputStream |
abstract public XMLStreamReader createXMLStreamReader(String systemId,
Reader reader) throws XMLStreamException
Create a new XMLStreamReader from a java.io.InputStream |
abstract public XMLEventAllocator getEventAllocator()
Gets the allocator used by streams created with this factory |
abstract public Object getProperty(String name) throws IllegalArgumentException
Get the value of a feature/property from the underlying implementation |
abstract public XMLReporter getXMLReporter()
The reporter that will be set on any XMLStreamReader or XMLEventReader created
by this factory instance. |
abstract public XMLResolver getXMLResolver()
The resolver that will be set on any XMLStreamReader or XMLEventReader created
by this factory instance. |
abstract public boolean isPropertySupported(String name)
Query the set of properties that this factory supports. |
public static XMLInputFactory newInstance() throws FactoryConfigurationError {
return (XMLInputFactory) FactoryFinder.find(
"javax.xml.stream.XMLInputFactory",
"com.sun.xml.internal.stream.XMLInputFactoryImpl");
}
Create a new instance of the factory.
This static method creates a new factory instance.
This method uses the following ordered lookup procedure to determine
the XMLInputFactory implementation class to load:
Use the javax.xml.stream.XMLInputFactory system property.
Use the properties file "lib/stax.properties" in the JRE directory.
This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system property defined above.
Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
The Services API will look for a classname in the file META-INF/services/javax.xml.stream.XMLInputFactory
in jars available to the runtime.
Platform default XMLInputFactory instance.
Once an application has obtained a reference to a XMLInputFactory
it can use the factory to configure and obtain stream instances. |
public static XMLInputFactory newInstance(String factoryId,
ClassLoader classLoader) throws FactoryConfigurationError {
try {
//do not fallback if given classloader can't find the class, throw exception
return (XMLInputFactory) FactoryFinder.newInstance(factoryId, classLoader, false);
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
}
}
Create a new instance of the factory |
abstract public void setEventAllocator(XMLEventAllocator allocator)
Set a user defined event allocator for events |
abstract public void setProperty(String name,
Object value) throws IllegalArgumentException
Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
is not required to support every setting of every property in the specification and may use IllegalArgumentException
to signal that an unsupported property may not be set with the specified value. |
abstract public void setXMLReporter(XMLReporter reporter)
The reporter that will be set on any XMLStreamReader or XMLEventReader created
by this factory instance. |
abstract public void setXMLResolver(XMLResolver resolver)
The resolver that will be set on any XMLStreamReader or XMLEventReader created
by this factory instance. |