com.sun.xml.fastinfoset.stax.factory
Class StAXInputFactory

java.lang.Object
  extended by javax.xml.stream.XMLInputFactory
      extended by com.sun.xml.fastinfoset.stax.factory.StAXInputFactory

public class StAXInputFactory
extends XMLInputFactory


Field Summary
 
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
 
Constructor Summary
StAXInputFactory()
           
 
Method Summary
 XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter)
          Create a filtered event reader that wraps the filter around the event reader
 XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter)
          Create a filtered reader that wraps the filter around the reader
 XMLEventReader createXMLEventReader(InputStream inputstream)
           
 XMLEventReader createXMLEventReader(InputStream stream, String encoding)
           
 XMLEventReader createXMLEventReader(Reader reader)
           
 XMLEventReader createXMLEventReader(Source source)
           
 XMLEventReader createXMLEventReader(String systemId, InputStream inputstream)
           
 XMLEventReader createXMLEventReader(String systemId, Reader reader)
           
 XMLEventReader createXMLEventReader(XMLStreamReader streamReader)
          Create a new XMLEventReader from an XMLStreamReader.
 XMLStreamReader createXMLStreamReader(InputStream s)
           
 XMLStreamReader createXMLStreamReader(InputStream inputstream, String encoding)
           
 XMLStreamReader createXMLStreamReader(Reader xmlfile)
          Create a new XMLStreamReader from a reader
 XMLStreamReader createXMLStreamReader(Source source)
           
 XMLStreamReader createXMLStreamReader(String systemId, InputStream inputstream)
           
 XMLStreamReader createXMLStreamReader(String systemId, Reader xmlfile)
           
 XMLEventAllocator getEventAllocator()
           
 Object getProperty(String name)
          Get the value of a feature/property from the underlying implementation
 XMLReporter getXMLReporter()
           
 XMLResolver getXMLResolver()
           
 boolean isPropertySupported(String name)
          Query the set of Properties that this factory supports.
static XMLInputFactory newInstance()
           
 void setEventAllocator(XMLEventAllocator allocator)
          Set a user defined event allocator for events
 void setProperty(String name, Object value)
          Allows the user to set specific feature/property on the underlying implementation.
 void setXMLReporter(XMLReporter xmlreporter)
           
 void setXMLResolver(XMLResolver xmlresolver)
           
 
Methods inherited from class javax.xml.stream.XMLInputFactory
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 XMLInputFactory newInstance()

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(Reader xmlfile)
                                      throws XMLStreamException
Create a new XMLStreamReader from a reader

Specified by:
createXMLStreamReader in class XMLInputFactory
Parameters:
xmlfile - the XML data to read from
Throws:
XMLStreamException

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(InputStream s)
                                      throws XMLStreamException
Specified by:
createXMLStreamReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(String systemId,
                                             Reader xmlfile)
                                      throws XMLStreamException
Specified by:
createXMLStreamReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(Source source)
                                      throws XMLStreamException
Specified by:
createXMLStreamReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(String systemId,
                                             InputStream inputstream)
                                      throws XMLStreamException
Specified by:
createXMLStreamReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(InputStream inputstream,
                                             String encoding)
                                      throws XMLStreamException
Specified by:
createXMLStreamReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(InputStream inputstream)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Parameters:
inputstream -
Returns:
XMLEventReader
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(Reader reader)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(Source source)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(String systemId,
                                           InputStream inputstream)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(InputStream stream,
                                           String encoding)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(String systemId,
                                           Reader reader)
                                    throws XMLStreamException
Specified by:
createXMLEventReader in class XMLInputFactory
Throws:
XMLStreamException

createXMLEventReader

public XMLEventReader createXMLEventReader(XMLStreamReader streamReader)
                                    throws 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 XMLInputFactory
Parameters:
streamReader - the XMLStreamReader to read from (may not be modified)
Returns:
a new XMLEventReader
Throws:
XMLStreamException

getEventAllocator

public XMLEventAllocator getEventAllocator()
Specified by:
getEventAllocator in class XMLInputFactory

getXMLReporter

public XMLReporter getXMLReporter()
Specified by:
getXMLReporter in class XMLInputFactory

getXMLResolver

public XMLResolver getXMLResolver()
Specified by:
getXMLResolver in class XMLInputFactory

setXMLReporter

public void setXMLReporter(XMLReporter xmlreporter)
Specified by:
setXMLReporter in class XMLInputFactory

setXMLResolver

public void setXMLResolver(XMLResolver xmlresolver)
Specified by:
setXMLResolver in class XMLInputFactory

createFilteredReader

public XMLEventReader createFilteredReader(XMLEventReader reader,
                                           EventFilter filter)
                                    throws XMLStreamException
Create a filtered event reader that wraps the filter around the event reader

Specified by:
createFilteredReader in class XMLInputFactory
Parameters:
reader - the event reader to wrap
filter - the filter to apply to the event reader
Throws:
XMLStreamException

createFilteredReader

public XMLStreamReader createFilteredReader(XMLStreamReader reader,
                                            StreamFilter filter)
                                     throws XMLStreamException
Create a filtered reader that wraps the filter around the reader

Specified by:
createFilteredReader in class XMLInputFactory
Parameters:
reader - the reader to filter
filter - the filter to apply to the reader
Throws:
XMLStreamException

getProperty

public Object getProperty(String name)
                   throws IllegalArgumentException
Get the value of a feature/property from the underlying implementation

Specified by:
getProperty in class XMLInputFactory
Parameters:
name - The name of the property (may not be null)
Returns:
The value of the property
Throws:
IllegalArgumentException - if the property is not supported

isPropertySupported

public boolean isPropertySupported(String name)
Query the set of Properties that this factory supports.

Specified by:
isPropertySupported in class 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(XMLEventAllocator allocator)
Set a user defined event allocator for events

Specified by:
setEventAllocator in class XMLInputFactory
Parameters:
allocator - the user defined allocator

setProperty

public void setProperty(String name,
                        Object value)
                 throws 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 XMLInputFactory
Parameters:
name - The name of the property (may not be null)
value - The value of the property
Throws:
IllegalArgumentException - if the property is not supported


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.