Class AsyncXMLInputFactory

  • All Implemented Interfaces:
    org.codehaus.stax2.XMLStreamProperties
    Direct Known Subclasses:
    InputFactoryImpl

    public abstract class AsyncXMLInputFactory
    extends org.codehaus.stax2.XMLInputFactory2
    Extension of XMLInputFactory2 to provide factory methods for constructing non-blocking (asynchronous) parsers (of type AsyncXMLStreamReader.
    • Field Summary

      • Fields inherited from class org.codehaus.stax2.XMLInputFactory2

        P_AUTO_CLOSE_INPUT, P_DTD_OVERRIDE, P_INTERN_NAMES, P_INTERN_NS_URIS, P_LAZY_PARSING, P_PRESERVE_LOCATION, P_REPORT_CDATA, P_REPORT_PROLOG_WHITESPACE
      • 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
      • Fields inherited from interface org.codehaus.stax2.XMLStreamProperties

        XSP_IMPLEMENTATION_NAME, XSP_IMPLEMENTATION_VERSION, XSP_NAMESPACE_AWARE, XSP_PROBLEM_REPORTER, XSP_SUPPORT_XMLID, XSP_SUPPORTS_XML11, XSP_V_XMLID_FULL, XSP_V_XMLID_NONE, XSP_V_XMLID_TYPING
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor​(byte[] input)
      Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
      abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor​(byte[] input, int offset, int length)
      Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
      abstract AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncFor​(java.nio.ByteBuffer input)
      Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data.
      abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncForByteArray()
      Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
      abstract AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncForByteBuffer()
      Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
      • Methods inherited from class org.codehaus.stax2.XMLInputFactory2

        configureForConvenience, configureForLowMemUsage, configureForRoundTripping, configureForSpeed, configureForXmlConformance, createXMLEventReader, createXMLEventReader, createXMLStreamReader, createXMLStreamReader
      • Methods inherited from class javax.xml.stream.XMLInputFactory

        createFilteredReader, createFilteredReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, createXMLStreamReader, getEventAllocator, getProperty, getXMLReporter, getXMLResolver, isPropertySupported, newDefaultFactory, newFactory, newFactory, newInstance, newInstance, setEventAllocator, setProperty, setXMLReporter, setXMLResolver
      • Methods inherited from class java.lang.Object

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

      • AsyncXMLInputFactory

        public AsyncXMLInputFactory()
    • Method Detail

      • createAsyncForByteArray

        public abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncForByteArray()
        Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
        Returns:
        Non-blocking stream reader without any input
      • createAsyncFor

        public abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor​(byte[] input)
                                                                           throws javax.xml.stream.XMLStreamException
        Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.

        Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.

        Returns:
        Non-blocking stream reader initialized with given input
        Throws:
        javax.xml.stream.XMLStreamException
      • createAsyncFor

        public abstract AsyncXMLStreamReader<AsyncByteArrayFeeder> createAsyncFor​(byte[] input,
                                                                                  int offset,
                                                                                  int length)
                                                                           throws javax.xml.stream.XMLStreamException
        Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.

        Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.

        Returns:
        Non-blocking stream reader initialized with given input
        Throws:
        javax.xml.stream.XMLStreamException
      • createAsyncForByteBuffer

        public abstract AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncForByteBuffer()
        Method for constructing a non-blocking XMLStreamReader2 instance without any input data.
        Returns:
        Non-blocking stream reader without any input
      • createAsyncFor

        public abstract AsyncXMLStreamReader<AsyncByteBufferFeeder> createAsyncFor​(java.nio.ByteBuffer input)
                                                                            throws javax.xml.stream.XMLStreamException
        Method for constructing a non-blocking XMLStreamReader2 instance with specified initial input data. Input data will not be parsed at this point but merely fed to be parsed as needed with Stax API calls.

        Note that caller needs to ensure that given input buffer is available for parser to use until it has been fully consumed; parser is not required to make a copy of it, in order to minimize number of copies made. Caller can choose to just make a copy to pass. After input has been parsed buffer can be reused.

        Returns:
        Non-blocking stream reader initialized with given input
        Throws:
        javax.xml.stream.XMLStreamException