Top Fields Constructors Methods
org.codehaus.jettison

public abstract Class AbstractXMLInputFactory

extends XMLInputFactory
Class Inheritance
Known Direct Subclasses
org.codehaus.jettison.badgerfish.BadgerFishXMLInputFactory, org.codehaus.jettison.mapped.MappedXMLInputFactory
Imports
java.io.*, javax.xml.stream.EventFilter, .StreamFilter, .XMLEventReader, .XMLInputFactory, .XMLReporter, .XMLResolver, .XMLStreamException, .XMLStreamReader, javax.xml.stream.util.XMLEventAllocator, javax.xml.transform.Source, javax.xml.transform.stream.StreamSource, org.codehaus.jettison.json.JSONTokener

Field Summary

Modifier and TypeField and Description
private int
private static final int
Inherited from javax.xml.stream.XMLInputFactory:
ALLOCATORIS_COALESCINGIS_NAMESPACE_AWAREIS_REPLACING_ENTITY_REFERENCESIS_SUPPORTING_EXTERNAL_ENTITIESIS_VALIDATINGREPORTERRESOLVERSUPPORT_DTD

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public XMLEventReader
createFilteredReader(XMLEventReader
the event reader to wrap
arg0
,
EventFilter
the filter to apply to the event reader
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered event reader that wraps the filter around the event reader
public XMLStreamReader
createFilteredReader(XMLStreamReader
the reader to filter
arg0
,
StreamFilter
the filter to apply to the reader
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered reader that wraps the filter around the reader
protected JSONTokener
public XMLEventReader
createXMLEventReader(InputStream
the InputStream to read from
arg0
,
String
the character encoding of the stream
encoding
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(InputStream
the InputStream to read from
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(Reader
the XML data to read from
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.
public XMLEventReader
createXMLEventReader(Source
the source to read from
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a JAXP source.
public XMLEventReader
createXMLEventReader(String
the system ID of the stream
systemId
,
InputStream
the InputStream to read from
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream
public XMLEventReader
createXMLEventReader(String
the system ID of the input
systemId
,
Reader
the XML data to read from
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.
public XMLEventReader
createXMLEventReader(XMLStreamReader
the XMLStreamReader to read from (may not be modified)
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from an XMLStreamReader.
public XMLStreamReader
createXMLStreamReader(InputStream
the InputStream to read from
is
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader
createXMLStreamReader(InputStream
the InputStream to read from
is
,
String
the character encoding of the stream
charset
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public abstract XMLStreamReader
public XMLStreamReader
createXMLStreamReader(Reader
the XML data to read from
reader
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a reader.
public XMLStreamReader
createXMLStreamReader(Source
the source to read from
src
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a JAXP source.
public XMLStreamReader
createXMLStreamReader(String
the system ID of the stream
systemId
,
InputStream
the InputStream to read from
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLStreamReader
createXMLStreamReader(String
the system ID of the stream
systemId
,
Reader
the InputStream to read from
r
)

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.
public XMLEventAllocator
getEventAllocator()

Implements abstract javax.xml.stream.XMLInputFactory.getEventAllocator.

Gets the allocator used by streams created with this factory
public Object
getProperty(String
The name of the property (may not be null)
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.getProperty.

Get the value of a feature/property from the underlying implementation
public XMLReporter
getXMLReporter()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public XMLResolver
getXMLResolver()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public boolean
isPropertySupported(String
The name of the property (may not be null)
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.isPropertySupported.

Query the set of properties that this factory supports.
private String
readAll(InputStream in, String encoding)

This helper method tries to read and decode input efficiently into a result String.

private String
public void
setEventAllocator(XMLEventAllocator
the user defined allocator
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.setEventAllocator.

Set a user defined event allocator for events
public void
setProperty(String
The name of the property (may not be null)
arg0
,
Object
The value of the property
arg1
)

Implements abstract javax.xml.stream.XMLInputFactory.setProperty.

Allows the user to set specific feature/property on the underlying implementation.
public void
setXMLReporter(XMLReporter
the resolver to use to report non fatal errors
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
public void
setXMLResolver(XMLResolver
the resolver to use to resolve references
arg0
)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.
Inherited from javax.xml.stream.XMLInputFactory:
newDefaultFactorynewFactorynewFactorynewInstancenewInstance

Field Detail

bufSizeback to summary
private int bufSize
INPUT_BUF_SIZEback to summary
private static final int INPUT_BUF_SIZE

Constructor Detail

AbstractXMLInputFactoryback to summary
protected AbstractXMLInputFactory()
AbstractXMLInputFactoryback to summary
protected AbstractXMLInputFactory(int bufSize)

Method Detail

createFilteredReaderback to summary
public XMLEventReader createFilteredReader(XMLEventReader arg0, EventFilter arg1) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Doc from javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered event reader that wraps the filter around the event reader

Parameters
arg0:XMLEventReader

the event reader to wrap

arg1:EventFilter

the filter to apply to the event reader

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createFilteredReaderback to summary
public XMLStreamReader createFilteredReader(XMLStreamReader arg0, StreamFilter arg1) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createFilteredReader.

Doc from javax.xml.stream.XMLInputFactory.createFilteredReader.

Create a filtered reader that wraps the filter around the reader

Parameters
arg0:XMLStreamReader

the reader to filter

arg1:StreamFilter

the filter to apply to the reader

Returns:XMLStreamReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createNewJSONTokenerback to summary
protected JSONTokener createNewJSONTokener(String doc)
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(InputStream arg0, String encoding) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream

Parameters
arg0:InputStream

the InputStream to read from

encoding:String

the character encoding of the stream

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(InputStream arg0) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream

Parameters
arg0:InputStream

the InputStream to read from

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(Reader arg0) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.

Parameters
arg0:Reader

the XML data to read from

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(Source arg0) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a JAXP source. Support of this method is optional.

Parameters
arg0:Source

the source to read from

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(String systemId, InputStream arg1) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a java.io.InputStream

Parameters
systemId:String

the system ID of the stream

arg1:InputStream

the InputStream to read from

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(String systemId, Reader arg1) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

Create a new XMLEventReader from a reader.

Parameters
systemId:String

the system ID of the input

arg1:Reader

the XML data to read from

Returns:XMLEventReader

an instance of the XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLEventReaderback to summary
public XMLEventReader createXMLEventReader(XMLStreamReader arg0) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLEventReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLEventReader.

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.

Parameters
arg0:XMLStreamReader

the XMLStreamReader to read from (may not be modified)

Returns:XMLEventReader

a new XMLEventReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(InputStream is) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.

Parameters
is:InputStream

the InputStream to read from

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(InputStream is, String charset) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.

Parameters
is:InputStream

the InputStream to read from

charset:String

the character encoding of the stream

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public abstract XMLStreamReader createXMLStreamReader(JSONTokener tokener) throws XMLStreamException
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a reader.

Parameters
reader:Reader

the XML data to read from

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(Source src) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a JAXP source. This method is optional.

Parameters
src:Source

the source to read from

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(String systemId, InputStream arg1) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.

Parameters
systemId:String

the system ID of the stream

arg1:InputStream

the InputStream to read from

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamReaderback to summary
public XMLStreamReader createXMLStreamReader(String systemId, Reader r) throws XMLStreamException

Implements abstract javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Doc from javax.xml.stream.XMLInputFactory.createXMLStreamReader.

Create a new XMLStreamReader from a java.io.InputStream.

Parameters
systemId:String

the system ID of the stream

r:Reader

the InputStream to read from

Returns:XMLStreamReader

an instance of the XMLStreamReader

Exceptions
XMLStreamException:
if an error occurs
getEventAllocatorback to summary
public XMLEventAllocator getEventAllocator()

Implements abstract javax.xml.stream.XMLInputFactory.getEventAllocator.

Doc from javax.xml.stream.XMLInputFactory.getEventAllocator.

Gets the allocator used by streams created with this factory

Returns:XMLEventAllocator

an instance of the XMLEventAllocator

getPropertyback to summary
public Object getProperty(String arg0) throws IllegalArgumentException

Implements abstract javax.xml.stream.XMLInputFactory.getProperty.

Doc from javax.xml.stream.XMLInputFactory.getProperty.

Get the value of a feature/property from the underlying implementation

Parameters
arg0:String

The name of the property (may not be null)

Returns:Object

The value of the property

Exceptions
IllegalArgumentException:
if the property is not supported
getXMLReporterback to summary
public XMLReporter getXMLReporter()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLReporter.

Doc from javax.xml.stream.XMLInputFactory.getXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Returns:XMLReporter

an instance of the XMLReporter

getXMLResolverback to summary
public XMLResolver getXMLResolver()

Implements abstract javax.xml.stream.XMLInputFactory.getXMLResolver.

Doc from javax.xml.stream.XMLInputFactory.getXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Returns:XMLResolver

an instance of the XMLResolver

isPropertySupportedback to summary
public boolean isPropertySupported(String arg0)

Implements abstract javax.xml.stream.XMLInputFactory.isPropertySupported.

Doc from javax.xml.stream.XMLInputFactory.isPropertySupported.

Query the set of properties that this factory supports.

Parameters
arg0:String

The name of the property (may not be null)

Returns:boolean

true if the property is supported and false otherwise

readAllback to summary
private String readAll(InputStream in, String encoding) throws IOException

This helper method tries to read and decode input efficiently into a result String.

readAllback to summary
private String readAll(Reader r) throws IOException
setEventAllocatorback to summary
public void setEventAllocator(XMLEventAllocator arg0)

Implements abstract javax.xml.stream.XMLInputFactory.setEventAllocator.

Doc from javax.xml.stream.XMLInputFactory.setEventAllocator.

Set a user defined event allocator for events

Parameters
arg0:XMLEventAllocator

the user defined allocator

setPropertyback to summary
public void setProperty(String arg0, Object arg1) throws IllegalArgumentException

Implements abstract javax.xml.stream.XMLInputFactory.setProperty.

Doc from javax.xml.stream.XMLInputFactory.setProperty.

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 javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD property.

Parameters
arg0:String

The name of the property (may not be null)

arg1:Object

The value of the property

Exceptions
IllegalArgumentException:
if the property is not supported
setXMLReporterback to summary
public void setXMLReporter(XMLReporter arg0)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLReporter.

Doc from javax.xml.stream.XMLInputFactory.setXMLReporter.

The reporter that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Parameters
arg0:XMLReporter

the resolver to use to report non fatal errors

setXMLResolverback to summary
public void setXMLResolver(XMLResolver arg0)

Implements abstract javax.xml.stream.XMLInputFactory.setXMLResolver.

Doc from javax.xml.stream.XMLInputFactory.setXMLResolver.

The resolver that will be set on any XMLStreamReader or XMLEventReader created by this factory instance.

Parameters
arg0:XMLResolver

the resolver to use to resolve references