Class StAXInputFactory


  • public class StAXInputFactory
    extends javax.xml.stream.XMLInputFactory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private StAXManager _manager  
      • Fields inherited from class javax.xml.stream.XMLInputFactory

        ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.stream.XMLEventReader createFilteredReader​(javax.xml.stream.XMLEventReader reader, javax.xml.stream.EventFilter filter)
      Create a filtered event reader that wraps the filter around the event reader
      javax.xml.stream.XMLStreamReader createFilteredReader​(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.StreamFilter filter)
      Create a filtered reader that wraps the filter around the reader
      javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.InputStream inputstream)  
      javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.InputStream stream, java.lang.String encoding)  
      javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.Reader reader)  
      javax.xml.stream.XMLEventReader createXMLEventReader​(java.lang.String systemId, java.io.InputStream inputstream)  
      javax.xml.stream.XMLEventReader createXMLEventReader​(java.lang.String systemId, java.io.Reader reader)  
      javax.xml.stream.XMLEventReader createXMLEventReader​(javax.xml.stream.XMLStreamReader streamReader)
      Create a new XMLEventReader from an XMLStreamReader.
      javax.xml.stream.XMLEventReader createXMLEventReader​(javax.xml.transform.Source source)  
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.InputStream s)  
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.InputStream inputstream, java.lang.String encoding)  
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.Reader xmlfile)
      Create a new XMLStreamReader from a reader
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.lang.String systemId, java.io.InputStream inputstream)  
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.lang.String systemId, java.io.Reader xmlfile)  
      javax.xml.stream.XMLStreamReader createXMLStreamReader​(javax.xml.transform.Source source)  
      javax.xml.stream.util.XMLEventAllocator getEventAllocator()  
      java.lang.Object getProperty​(java.lang.String name)
      Get the value of a feature/property from the underlying implementation
      javax.xml.stream.XMLReporter getXMLReporter()  
      javax.xml.stream.XMLResolver getXMLResolver()  
      (package private) javax.xml.stream.XMLStreamReader getXMLStreamReader​(java.io.Reader xmlfile)  
      (package private) javax.xml.stream.XMLStreamReader getXMLStreamReader​(java.lang.String systemId, java.io.InputStream inputstream, java.lang.String encoding)  
      boolean isPropertySupported​(java.lang.String name)
      Query the set of Properties that this factory supports.
      static javax.xml.stream.XMLInputFactory newInstance()  
      void setEventAllocator​(javax.xml.stream.util.XMLEventAllocator allocator)
      Set a user defined event allocator for events
      void setProperty​(java.lang.String name, java.lang.Object value)
      Allows the user to set specific feature/property on the underlying implementation.
      void setXMLReporter​(javax.xml.stream.XMLReporter xmlreporter)  
      void setXMLResolver​(javax.xml.stream.XMLResolver xmlresolver)  
      • Methods inherited from class javax.xml.stream.XMLInputFactory

        newDefaultFactory, newFactory, newFactory, newInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StAXInputFactory

        public StAXInputFactory()
    • Method Detail

      • newInstance

        public static javax.xml.stream.XMLInputFactory newInstance()
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.Reader xmlfile)
                                                               throws javax.xml.stream.XMLStreamException
        Create a new XMLStreamReader from a reader
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Parameters:
        xmlfile - the XML data to read from
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.InputStream s)
                                                               throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.lang.String systemId,
                                                                      java.io.Reader xmlfile)
                                                               throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(javax.xml.transform.Source source)
                                                               throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.lang.String systemId,
                                                                      java.io.InputStream inputstream)
                                                               throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.InputStream inputstream,
                                                                      java.lang.String encoding)
                                                               throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLStreamReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • getXMLStreamReader

        javax.xml.stream.XMLStreamReader getXMLStreamReader​(java.lang.String systemId,
                                                            java.io.InputStream inputstream,
                                                            java.lang.String encoding)
                                                     throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • getXMLStreamReader

        javax.xml.stream.XMLStreamReader getXMLStreamReader​(java.io.Reader xmlfile)
                                                     throws javax.xml.stream.XMLStreamException
        Parameters:
        xmlfile - source XML file
        Returns:
        new instance of XML Reader
        Throws:
        javax.xml.stream.XMLStreamException - on error
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.InputStream inputstream)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Returns:
        XMLEventReader
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.Reader reader)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(javax.xml.transform.Source source)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(java.lang.String systemId,
                                                                    java.io.InputStream inputstream)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(java.io.InputStream stream,
                                                                    java.lang.String encoding)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(java.lang.String systemId,
                                                                    java.io.Reader reader)
                                                             throws javax.xml.stream.XMLStreamException
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLEventReader

        public javax.xml.stream.XMLEventReader createXMLEventReader​(javax.xml.stream.XMLStreamReader streamReader)
                                                             throws javax.xml.stream.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.
        Specified by:
        createXMLEventReader in class javax.xml.stream.XMLInputFactory
        Parameters:
        streamReader - the XMLStreamReader to read from (may not be modified)
        Returns:
        a new XMLEventReader
        Throws:
        javax.xml.stream.XMLStreamException
      • getEventAllocator

        public javax.xml.stream.util.XMLEventAllocator getEventAllocator()
        Specified by:
        getEventAllocator in class javax.xml.stream.XMLInputFactory
      • getXMLReporter

        public javax.xml.stream.XMLReporter getXMLReporter()
        Specified by:
        getXMLReporter in class javax.xml.stream.XMLInputFactory
      • getXMLResolver

        public javax.xml.stream.XMLResolver getXMLResolver()
        Specified by:
        getXMLResolver in class javax.xml.stream.XMLInputFactory
      • setXMLReporter

        public void setXMLReporter​(javax.xml.stream.XMLReporter xmlreporter)
        Specified by:
        setXMLReporter in class javax.xml.stream.XMLInputFactory
      • setXMLResolver

        public void setXMLResolver​(javax.xml.stream.XMLResolver xmlresolver)
        Specified by:
        setXMLResolver in class javax.xml.stream.XMLInputFactory
      • createFilteredReader

        public javax.xml.stream.XMLEventReader createFilteredReader​(javax.xml.stream.XMLEventReader reader,
                                                                    javax.xml.stream.EventFilter filter)
                                                             throws javax.xml.stream.XMLStreamException
        Create a filtered event reader that wraps the filter around the event reader
        Specified by:
        createFilteredReader in class javax.xml.stream.XMLInputFactory
        Parameters:
        reader - the event reader to wrap
        filter - the filter to apply to the event reader
        Throws:
        javax.xml.stream.XMLStreamException
      • createFilteredReader

        public javax.xml.stream.XMLStreamReader createFilteredReader​(javax.xml.stream.XMLStreamReader reader,
                                                                     javax.xml.stream.StreamFilter filter)
                                                              throws javax.xml.stream.XMLStreamException
        Create a filtered reader that wraps the filter around the reader
        Specified by:
        createFilteredReader in class javax.xml.stream.XMLInputFactory
        Parameters:
        reader - the reader to filter
        filter - the filter to apply to the reader
        Throws:
        javax.xml.stream.XMLStreamException
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
                                     throws java.lang.IllegalArgumentException
        Get the value of a feature/property from the underlying implementation
        Specified by:
        getProperty in class javax.xml.stream.XMLInputFactory
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        The value of the property
        Throws:
        java.lang.IllegalArgumentException - if the property is not supported
      • isPropertySupported

        public boolean isPropertySupported​(java.lang.String name)
        Query the set of Properties that this factory supports.
        Specified by:
        isPropertySupported in class javax.xml.stream.XMLInputFactory
        Parameters:
        name - The name of the property (may not be null)
        Returns:
        true if the property is supported and false otherwise
      • setEventAllocator

        public void setEventAllocator​(javax.xml.stream.util.XMLEventAllocator allocator)
        Set a user defined event allocator for events
        Specified by:
        setEventAllocator in class javax.xml.stream.XMLInputFactory
        Parameters:
        allocator - the user defined allocator
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.Object value)
                         throws java.lang.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.
        Specified by:
        setProperty in class javax.xml.stream.XMLInputFactory
        Parameters:
        name - The name of the property (may not be null)
        value - The value of the property
        Throws:
        java.lang.IllegalArgumentException - if the property is not supported