gnu.xml.stream

Class XMLInputFactoryImpl


public class XMLInputFactoryImpl
extends XMLInputFactory

Factory for creating parsers from various kinds of XML source.

Field Summary

protected XMLEventAllocator
allocator
protected boolean
baseAware
protected boolean
coalescing
protected boolean
externalEntities
protected boolean
namespaceAware
protected boolean
replacingEntityReferences
protected XMLReporter
reporter
protected XMLResolver
resolver
protected boolean
stringInterning
protected boolean
supportDTD
protected boolean
validating
protected boolean
xIncludeAware

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

XMLInputFactoryImpl()
The basic constructor.

Method Summary

XMLEventReader
createFilteredReader(XMLEventReader reader, EventFilter filter)
Create a new filtered reader.
XMLStreamReader
createFilteredReader(XMLStreamReader reader, StreamFilter filter)
Create a new filtered reader.
XMLEventReader
createXMLEventReader(InputStream in)
Creates a new event reader.
XMLEventReader
createXMLEventReader(InputStream in, String encoding)
Creates a new event reader.
XMLEventReader
createXMLEventReader(Reader reader)
Creates a new event reader.
XMLEventReader
createXMLEventReader(String systemId, InputStream in)
Creates a new event reader.
XMLEventReader
createXMLEventReader(String systemId, Reader reader)
Creates a new event reader.
XMLEventReader
createXMLEventReader(XMLStreamReader reader)
Creates a new event reader.
XMLEventReader
createXMLEventReader(Source source)
Creates a new event reader.
XMLStreamReader
createXMLStreamReader(InputStream in)
Creates a new stream reader.
XMLStreamReader
createXMLStreamReader(InputStream in, String encoding)
Creates a new stream reader.
XMLStreamReader
createXMLStreamReader(Reader reader)
Creates a new stream reader.
XMLStreamReader
createXMLStreamReader(String systemId, InputStream in)
Creates a new stream reader.
XMLStreamReader
createXMLStreamReader(String systemId, Reader reader)
Creates a new stream reader.
XMLStreamReader
createXMLStreamReader(Source source)
Creates a new stream reader.
XMLEventAllocator
getEventAllocator()
Returns the event allocator.
protected InputStream
getInputStream(Source source)
Object
getProperty(String name)
Returns the implementation-specific property of the given name.
XMLReporter
getXMLReporter()
Returns the error reporter.
XMLResolver
getXMLResolver()
Returns the entity resolver.
boolean
isCoalescing()
boolean
isPropertySupported(String name)
Indicates whether the specified property is supported.
void
setCoalescing(boolean coalescing)
void
setEventAllocator(XMLEventAllocator allocator)
Sets the event allocator.
void
setProperty(String name, Object value)
Sets the implementation-specific property of the given name.
void
setXMLReporter(XMLReporter reporter)
Sets the error reporter.
void
setXMLResolver(XMLResolver resolver)
Sets the entity resolver.

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, newInstance, newInstance, setEventAllocator, setProperty, setXMLReporter, setXMLResolver

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

allocator

protected XMLEventAllocator allocator

baseAware

protected boolean baseAware

coalescing

protected boolean coalescing

externalEntities

protected boolean externalEntities

namespaceAware

protected boolean namespaceAware

replacingEntityReferences

protected boolean replacingEntityReferences

reporter

protected XMLReporter reporter

resolver

protected XMLResolver resolver

stringInterning

protected boolean stringInterning

supportDTD

protected boolean supportDTD

validating

protected boolean validating

xIncludeAware

protected boolean xIncludeAware

Constructor Details

XMLInputFactoryImpl

public XMLInputFactoryImpl()
The basic constructor. Object is special, because it has no superclass, so there is no call to super().

Method Details

createFilteredReader

public XMLEventReader createFilteredReader(XMLEventReader reader,
                                           EventFilter filter)
            throws XMLStreamException
Create a new filtered reader.
Overrides:
createFilteredReader in interface XMLInputFactory

createFilteredReader

public XMLStreamReader createFilteredReader(XMLStreamReader reader,
                                            StreamFilter filter)
            throws XMLStreamException
Create a new filtered reader.
Overrides:
createFilteredReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(InputStream in)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(InputStream in,
                                           String encoding)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(Reader reader)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(String systemId,
                                           InputStream in)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(String systemId,
                                           Reader reader)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(XMLStreamReader reader)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLEventReader

public XMLEventReader createXMLEventReader(Source source)
            throws XMLStreamException
Creates a new event reader.
Overrides:
createXMLEventReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(InputStream in)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(InputStream in,
                                             String encoding)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(Reader reader)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(String systemId,
                                             InputStream in)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(String systemId,
                                             Reader reader)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

createXMLStreamReader

public XMLStreamReader createXMLStreamReader(Source source)
            throws XMLStreamException
Creates a new stream reader.
Overrides:
createXMLStreamReader in interface XMLInputFactory

getEventAllocator

public XMLEventAllocator getEventAllocator()
Returns the event allocator.
Overrides:
getEventAllocator in interface XMLInputFactory

getInputStream

protected InputStream getInputStream(Source source)
            throws XMLStreamException

getProperty

public Object getProperty(String name)
            throws IllegalArgumentException
Returns the implementation-specific property of the given name.
Overrides:
getProperty in interface XMLInputFactory
Throws:
IllegalArgumentException - if the property is not supported

getXMLReporter

public XMLReporter getXMLReporter()
Returns the error reporter.
Overrides:
getXMLReporter in interface XMLInputFactory

getXMLResolver

public XMLResolver getXMLResolver()
Returns the entity resolver.
Overrides:
getXMLResolver in interface XMLInputFactory

isCoalescing

public boolean isCoalescing()

isPropertySupported

public boolean isPropertySupported(String name)
Indicates whether the specified property is supported.
Overrides:
isPropertySupported in interface XMLInputFactory

setCoalescing

public void setCoalescing(boolean coalescing)

setEventAllocator

public void setEventAllocator(XMLEventAllocator allocator)
Sets the event allocator.
Overrides:
setEventAllocator in interface XMLInputFactory

setProperty

public void setProperty(String name,
                        Object value)
            throws IllegalArgumentException
Sets the implementation-specific property of the given name.
Overrides:
setProperty in interface XMLInputFactory
Throws:
IllegalArgumentException - if the property is not supported

setXMLReporter

public void setXMLReporter(XMLReporter reporter)
Sets the error reporter.
Overrides:
setXMLReporter in interface XMLInputFactory

setXMLResolver

public void setXMLResolver(XMLResolver resolver)
Sets the entity resolver.
Overrides:
setXMLResolver in interface XMLInputFactory

XMLInputFactoryImpl.java -- Copyright (C) 2005,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.