declare namespace javax { namespace xml { namespace stream { /** * 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 |
* This static method creates a new factory instance. * This method uses the following ordered lookup procedure to determine * the XMLInputFactory implementation class to load: *
** Once an application has obtained a reference to a XMLInputFactory it * can use the factory to configure and obtain stream instances. *
** Note that this is a new method that replaces the deprecated newInstance() method. * No changes in behavior are defined by this replacement method relative to * the deprecated method. *
* @throws FactoryConfigurationError in case of {#linkplain * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. */ // @ts-ignore public static newFactory(): javax.xml.stream.XMLInputFactory /** * Create a new instance of the factory * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use * @return the factory implementation * @throws FactoryConfigurationError if an instance of this factory cannot be loaded * @deprecated This method has been deprecated to maintain API consistency. * All newInstance methods have been replaced with corresponding * newFactory methods. The replacement {#link * #newFactory(java.lang.String, java.lang.ClassLoader)} method * defines no changes in behavior. */ // @ts-ignore public static newInstance(factoryId: java.lang.String | string, classLoader: java.lang.ClassLoader): javax.xml.stream.XMLInputFactory /** * Create a new instance of the factory. * If the classLoader argument is null, then the ContextClassLoader is used. ** This method uses the following ordered lookup procedure to determine * the XMLInputFactory implementation class to load: *
** Note that this is a new method that replaces the deprecated * {@link #newInstance(java.lang.String, java.lang.ClassLoader) * newInstance(String factoryId, ClassLoader classLoader)} method. * No changes in behavior are defined by this replacement method relative * to the deprecated method. *
* @apiNote The parameter factoryId defined here is inconsistent with that * of other JAXP factories where the first parameter is fully qualified * factory class name that provides implementation of the factory. * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use * @return the factory implementation * @throws FactoryConfigurationError in case of {#linkplain * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ // @ts-ignore public static newFactory(factoryId: java.lang.String | string, classLoader: java.lang.ClassLoader): javax.xml.stream.XMLInputFactory /** * Create a new XMLStreamReader from a reader * @param reader the XML data to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLStreamReader(reader: java.io.Reader): javax.xml.stream.XMLStreamReader /** * Create a new XMLStreamReader from a JAXP source. This method is optional. * @param source the source to read from * @throws UnsupportedOperationException if this method is not * supported by this XMLInputFactory * @throws XMLStreamException */ // @ts-ignore public abstract createXMLStreamReader(source: javax.xml.transform.Source): javax.xml.stream.XMLStreamReader /** * Create a new XMLStreamReader from a java.io.InputStream * @param stream the InputStream to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLStreamReader(stream: java.io.InputStream): javax.xml.stream.XMLStreamReader /** * Create a new XMLStreamReader from a java.io.InputStream * @param stream the InputStream to read from * @param encoding the character encoding of the stream * @throws XMLStreamException */ // @ts-ignore public abstract createXMLStreamReader(stream: java.io.InputStream, encoding: java.lang.String | string): javax.xml.stream.XMLStreamReader /** * Create a new XMLStreamReader from a java.io.InputStream * @param systemId the system ID of the stream * @param stream the InputStream to read from */ // @ts-ignore public abstract createXMLStreamReader(systemId: java.lang.String | string, stream: java.io.InputStream): javax.xml.stream.XMLStreamReader /** * Create a new XMLStreamReader from a java.io.InputStream * @param systemId the system ID of the stream * @param reader the InputStream to read from */ // @ts-ignore public abstract createXMLStreamReader(systemId: java.lang.String | string, reader: java.io.Reader): javax.xml.stream.XMLStreamReader /** * Create a new XMLEventReader from a reader * @param reader the XML data to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(reader: java.io.Reader): javax.xml.stream.XMLEventReader /** * Create a new XMLEventReader from a reader * @param systemId the system ID of the input * @param reader the XML data to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(systemId: java.lang.String | string, reader: java.io.Reader): javax.xml.stream.XMLEventReader /** * 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. * @param reader the XMLStreamReader to read from (may not be modified) * @return a new XMLEventReader * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(reader: javax.xml.stream.XMLStreamReader): javax.xml.stream.XMLEventReader /** * Create a new XMLEventReader from a JAXP source. * Support of this method is optional. * @param source the source to read from * @throws UnsupportedOperationException if this method is not * supported by this XMLInputFactory */ // @ts-ignore public abstract createXMLEventReader(source: javax.xml.transform.Source): javax.xml.stream.XMLEventReader /** * Create a new XMLEventReader from a java.io.InputStream * @param stream the InputStream to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(stream: java.io.InputStream): javax.xml.stream.XMLEventReader /** * Create a new XMLEventReader from a java.io.InputStream * @param stream the InputStream to read from * @param encoding the character encoding of the stream * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(stream: java.io.InputStream, encoding: java.lang.String | string): javax.xml.stream.XMLEventReader /** * Create a new XMLEventReader from a java.io.InputStream * @param systemId the system ID of the stream * @param stream the InputStream to read from * @throws XMLStreamException */ // @ts-ignore public abstract createXMLEventReader(systemId: java.lang.String | string, stream: java.io.InputStream): javax.xml.stream.XMLEventReader /** * Create a filtered reader that wraps the filter around the reader * @param reader the reader to filter * @param filter the filter to apply to the reader * @throws XMLStreamException */ // @ts-ignore public abstract createFilteredReader(reader: javax.xml.stream.XMLStreamReader, filter: javax.xml.stream.StreamFilter): javax.xml.stream.XMLStreamReader /** * Create a filtered event reader that wraps the filter around the event reader * @param reader the event reader to wrap * @param filter the filter to apply to the event reader * @throws XMLStreamException */ // @ts-ignore public abstract createFilteredReader(reader: javax.xml.stream.XMLEventReader, filter: javax.xml.stream.EventFilter): javax.xml.stream.XMLEventReader /** * The resolver that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. */ // @ts-ignore public abstract getXMLResolver(): javax.xml.stream.XMLResolver /** * The resolver that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. * @param resolver the resolver to use to resolve references */ // @ts-ignore public abstract setXMLResolver(resolver: javax.xml.stream.XMLResolver): void /** * The reporter that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. */ // @ts-ignore public abstract getXMLReporter(): javax.xml.stream.XMLReporter /** * The reporter that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. * @param reporter the resolver to use to report non fatal errors */ // @ts-ignore public abstract setXMLReporter(reporter: javax.xml.stream.XMLReporter): void /** * 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. ** All implementations that implement JAXP 1.5 or newer are required to * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property. *
** Access to external DTDs, external Entity References is restricted to the * protocols specified by the property. If access is denied during parsing * due to the restriction of this property, {@link javax.xml.stream.XMLStreamException} * will be thrown by the {@link javax.xml.stream.XMLStreamReader#next()} or * {@link javax.xml.stream.XMLEventReader#nextEvent()} method. *
*