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 NameBehaviorReturn typeDefault ValueRequired
javax.xml.stream.isValidatingTurns on/off implementation specific DTD validationBooleanFalseNo
javax.xml.stream.isNamespaceAwareTurns on/off namespace processing for XML 1.0 supportBooleanTrueTrue (required) / False (optional)
javax.xml.stream.isCoalescingRequires the processor to coalesce adjacent character dataBooleanFalseYes
javax.xml.stream.isReplacingEntityReferencesreplace internal entity references with their replacement text and report them as charactersBooleanTrueYes
javax.xml.stream.isSupportingExternalEntitiesResolve external parsed entitiesBooleanUnspecifiedYes
javax.xml.stream.supportDTDUse this property to request processors that do not support DTDsBooleanTrueYes
javax.xml.stream.reportersets/gets the impl of the XMLReporter javax.xml.stream.XMLReporterNullYes
javax.xml.stream.resolversets/gets the impl of the XMLResolver interfacejavax.xml.stream.XMLResolverNullYes
javax.xml.stream.allocatorsets/gets the impl of the XMLEventAllocator interfacejavax.xml.stream.util.XMLEventAllocatorNullYes
* @version 1.2 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. * @see XMLOutputFactory * @see XMLEventReader * @see XMLStreamReader * @see EventFilter * @see XMLReporter * @see XMLResolver * @see javax.xml.stream.util.XMLEventAllocator * @since 1.6 */ // @ts-ignore abstract class XMLInputFactory extends java.lang.Object { // @ts-ignore constructor() /** * The property used to turn on/off namespace support, * this is to support XML 1.0 documents, * only the true setting must be supported */ // @ts-ignore public static readonly IS_NAMESPACE_AWARE: java.lang.String | string /** * The property used to turn on/off implementation specific validation */ // @ts-ignore public static readonly IS_VALIDATING: java.lang.String | string /** * The property that requires the parser to coalesce adjacent character data sections */ // @ts-ignore public static readonly IS_COALESCING: java.lang.String | string /** * Requires the parser to replace internal * entity references with their replacement * text and report them as characters */ // @ts-ignore public static readonly IS_REPLACING_ENTITY_REFERENCES: java.lang.String | string /** * The property that requires the parser to resolve external parsed entities */ // @ts-ignore public static readonly IS_SUPPORTING_EXTERNAL_ENTITIES: java.lang.String | string /** * The property that requires the parser to support DTDs */ // @ts-ignore public static readonly SUPPORT_DTD: java.lang.String | string /** * The property used to * set/get the implementation of the XMLReporter interface */ // @ts-ignore public static readonly REPORTER: java.lang.String | string /** * The property used to set/get the implementation of the XMLResolver */ // @ts-ignore public static readonly RESOLVER: java.lang.String | string /** * The property used to set/get the implementation of the allocator */ // @ts-ignore public static readonly ALLOCATOR: java.lang.String | string /** * Creates a new instance of the factory in exactly the same manner as the * {@link #newFactory()} method. * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ // @ts-ignore public static newInstance(): javax.xml.stream.XMLInputFactory /** * 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: *

* *

* 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. *

* * @param name The name of the property (may not be null) * @param value The value of the property * @throws java.lang.IllegalArgumentException if the property is not supported */ // @ts-ignore public abstract setProperty(name: java.lang.String | string, value: java.lang.Object | any): void /** * Get the value of a feature/property from the underlying implementation * @param name The name of the property (may not be null) * @return The value of the property * @throws IllegalArgumentException if the property is not supported */ // @ts-ignore public abstract getProperty(name: java.lang.String | string): any /** * Query the set of properties that this factory supports. * @param name The name of the property (may not be null) * @return true if the property is supported and false otherwise */ // @ts-ignore public abstract isPropertySupported(name: java.lang.String | string): boolean /** * Set a user defined event allocator for events * @param allocator the user defined allocator */ // @ts-ignore public abstract setEventAllocator(allocator: javax.xml.stream.util.XMLEventAllocator): void /** * Gets the allocator used by streams created with this factory */ // @ts-ignore public abstract getEventAllocator(): javax.xml.stream.util.XMLEventAllocator } } } }