|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.stream.XMLInputFactory
public abstract class XMLInputFactory
Defines an abstract implementation of a factory for getting streams. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
Configuration parameters | ||||
---|---|---|---|---|
Property Name | Behavior | Return type | Default Value | Required |
javax.xml.stream.isValidating | Turns on/off implementation specific DTD validation | Boolean | False | No |
javax.xml.stream.isNamespaceAware | Turns on/off namespace processing for XML 1.0 support | Boolean | True | True (required) / False (optional) |
javax.xml.stream.isCoalescing | Requires the processor to coalesce adjacent character data | Boolean | False | Yes |
javax.xml.stream.isReplacingEntityReferences | replace internal entity references with their replacement text and report them as characters | Boolean | True | Yes |
javax.xml.stream.isSupportingExternalEntities | Resolve external parsed entities | Boolean | Unspecified | Yes |
javax.xml.stream.supportDTD | Use this property to request processors that do not support DTDs | Boolean | True | Yes |
javax.xml.stream.reporter | sets/gets the impl of the XMLReporter | javax.xml.stream.XMLReporter | Null | Yes |
javax.xml.stream.resolver | sets/gets the impl of the XMLResolver interface | javax.xml.stream.XMLResolver | Null | Yes |
javax.xml.stream.allocator | sets/gets the impl of the XMLEventAllocator interface | javax.xml.stream.util.XMLEventAllocator | Null | Yes |
XMLOutputFactory
,
XMLEventReader
,
XMLStreamReader
,
EventFilter
,
XMLReporter
,
XMLResolver
,
XMLEventAllocator
Field Summary | |
---|---|
static java.lang.String |
ALLOCATOR
The property used to set/get the implementation of the allocator |
static java.lang.String |
IS_COALESCING
The property that requires the parser to coalesce adjacent character data sections |
static java.lang.String |
IS_NAMESPACE_AWARE
The property used to turn on/off namespace support, this is to support XML 1.0 documents, only the true setting must be supported |
static java.lang.String |
IS_REPLACING_ENTITY_REFERENCES
Requires the parser to replace internal entity references with their replacement text and report them as characters |
static java.lang.String |
IS_SUPPORTING_EXTERNAL_ENTITIES
The property that requires the parser to resolve external parsed entities |
static java.lang.String |
IS_VALIDATING
The property used to turn on/off implementation specific validation |
static java.lang.String |
REPORTER
The property used to set/get the implementation of the XMLReporter interface |
static java.lang.String |
RESOLVER
The property used to set/get the implementation of the XMLResolver |
static java.lang.String |
SUPPORT_DTD
The property that requires the parser to support DTDs |
Constructor Summary | |
---|---|
protected |
XMLInputFactory()
|
Method Summary | |
---|---|
abstract XMLEventReader |
createFilteredReader(XMLEventReader reader,
EventFilter filter)
Create a filtered event reader that wraps the filter around the event reader |
abstract XMLStreamReader |
createFilteredReader(XMLStreamReader reader,
StreamFilter filter)
Create a filtered reader that wraps the filter around the reader |
abstract XMLEventReader |
createXMLEventReader(java.io.InputStream stream)
Create a new XMLEventReader from a java.io.InputStream |
abstract XMLEventReader |
createXMLEventReader(java.io.InputStream stream,
java.lang.String encoding)
Create a new XMLEventReader from a java.io.InputStream |
abstract XMLEventReader |
createXMLEventReader(java.io.Reader reader)
Create a new XMLEventReader from a reader |
abstract XMLEventReader |
createXMLEventReader(javax.xml.transform.Source source)
Create a new XMLEventReader from a JAXP source. |
abstract XMLEventReader |
createXMLEventReader(java.lang.String systemId,
java.io.InputStream stream)
Create a new XMLEventReader from a java.io.InputStream |
abstract XMLEventReader |
createXMLEventReader(java.lang.String systemId,
java.io.Reader reader)
Create a new XMLEventReader from a reader |
abstract XMLEventReader |
createXMLEventReader(XMLStreamReader reader)
Create a new XMLEventReader from an XMLStreamReader. |
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLStreamReader |
createXMLStreamReader(java.io.InputStream stream,
java.lang.String encoding)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLStreamReader |
createXMLStreamReader(java.io.Reader reader)
Create a new XMLStreamReader from a reader |
abstract XMLStreamReader |
createXMLStreamReader(javax.xml.transform.Source source)
Create a new XMLStreamReader from a JAXP source. |
abstract XMLStreamReader |
createXMLStreamReader(java.lang.String systemId,
java.io.InputStream stream)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLStreamReader |
createXMLStreamReader(java.lang.String systemId,
java.io.Reader reader)
Create a new XMLStreamReader from a java.io.InputStream |
abstract XMLEventAllocator |
getEventAllocator()
Gets the allocator used by streams created with this factory |
abstract java.lang.Object |
getProperty(java.lang.String name)
Get the value of a feature/property from the underlying implementation |
abstract XMLReporter |
getXMLReporter()
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance. |
abstract XMLResolver |
getXMLResolver()
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance. |
abstract boolean |
isPropertySupported(java.lang.String name)
Query the set of properties that this factory supports. |
static XMLInputFactory |
newInstance()
Create a new instance of the factory. |
static XMLInputFactory |
newInstance(java.lang.String factoryId,
java.lang.ClassLoader classLoader)
Create a new instance of the factory |
abstract void |
setEventAllocator(XMLEventAllocator allocator)
Set a user defined event allocator for events |
abstract void |
setProperty(java.lang.String name,
java.lang.Object value)
Allows the user to set specific feature/property on the underlying implementation. |
abstract void |
setXMLReporter(XMLReporter reporter)
The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance. |
abstract void |
setXMLResolver(XMLResolver resolver)
The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IS_NAMESPACE_AWARE
public static final java.lang.String IS_VALIDATING
public static final java.lang.String IS_COALESCING
public static final java.lang.String IS_REPLACING_ENTITY_REFERENCES
public static final java.lang.String IS_SUPPORTING_EXTERNAL_ENTITIES
public static final java.lang.String SUPPORT_DTD
public static final java.lang.String REPORTER
public static final java.lang.String RESOLVER
public static final java.lang.String ALLOCATOR
Constructor Detail |
---|
protected XMLInputFactory()
Method Detail |
---|
public static XMLInputFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationError
- if an instance of this factory cannot be loadedpublic static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
factoryId
- Name of the factory to find, same as
a property nameclassLoader
- classLoader to use
FactoryConfigurationError
- if an instance of this factory cannot be loadedpublic abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException
reader
- the XML data to read from
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(javax.xml.transform.Source source) throws XMLStreamException
source
- the source to read from
java.lang.UnsupportedOperationException
- if this method is not
supported by this XMLInputFactory
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException
stream
- the InputStream to read from
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
stream
- the InputStream to read fromencoding
- the character encoding of the stream
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
systemId
- the system ID of the streamstream
- the InputStream to read from
XMLStreamException
public abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
systemId
- the system ID of the streamreader
- the InputStream to read from
XMLStreamException
public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException
reader
- the XML data to read from
XMLStreamException
public abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
systemId
- the system ID of the inputreader
- the XML data to read from
XMLStreamException
public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
reader
- the XMLStreamReader to read from (may not be modified)
XMLStreamException
public abstract XMLEventReader createXMLEventReader(javax.xml.transform.Source source) throws XMLStreamException
source
- the source to read from
java.lang.UnsupportedOperationException
- if this method is not
supported by this XMLInputFactory
XMLStreamException
public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) throws XMLStreamException
stream
- the InputStream to read from
XMLStreamException
public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
stream
- the InputStream to read fromencoding
- the character encoding of the stream
XMLStreamException
public abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
systemId
- the system ID of the streamstream
- the InputStream to read from
XMLStreamException
public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException
reader
- the reader to filterfilter
- the filter to apply to the reader
XMLStreamException
public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException
reader
- the event reader to wrapfilter
- the filter to apply to the event reader
XMLStreamException
public abstract XMLResolver getXMLResolver()
public abstract void setXMLResolver(XMLResolver resolver)
resolver
- the resolver to use to resolve referencespublic abstract XMLReporter getXMLReporter()
public abstract void setXMLReporter(XMLReporter reporter)
reporter
- the resolver to use to report non fatal errorspublic abstract void setProperty(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
name
- The name of the property (may not be null)value
- The value of the property
java.lang.IllegalArgumentException
- if the property is not supportedpublic abstract java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
name
- The name of the property (may not be null)
java.lang.IllegalArgumentException
- if the property is not supportedpublic abstract boolean isPropertySupported(java.lang.String name)
name
- The name of the property (may not be null)
public abstract void setEventAllocator(XMLEventAllocator allocator)
allocator
- the user defined allocatorpublic abstract XMLEventAllocator getEventAllocator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34