Top Description Constructors Methods
com.sun.xml.internal.stream.events

public Class XMLEventAllocatorImpl

extends Object
implements XMLEventAllocator
Class Inheritance
All Implemented Interfaces
javax.xml.stream.util.XMLEventAllocator
Imports
com.sun.org.apache.xerces.internal.impl.PropertyManager, java.util.List, javax.xml.stream.util.XMLEventAllocator, .XMLEventConsumer, javax.xml.stream.*, javax.xml.stream.events.*, javax.xml.XMLConstants, javax.xml.namespace.QName, com.sun.org.apache.xerces.internal.util.NamespaceContextWrapper, .NamespaceSupport

Implementation of XMLEvent Allocator.
Author
Neeraj bajaj, k venugopal

Constructor Summary

AccessConstructor and Description
public
XMLEventAllocatorImpl()

Creates a new instance of XMLEventAllocator

Method Summary

Modifier and TypeMethod and Description
public XMLEvent
allocate(XMLStreamReader
The XMLStreamReader to allocate from
xMLStreamReader
)

Implements javax.xml.stream.util.XMLEventAllocator.allocate.

This method allocates an event given the current state of the XMLStreamReader.

public void
allocate(XMLStreamReader
The XMLStreamReader to allocate from
xMLStreamReader
,
XMLEventConsumer
The XMLEventConsumer to add to.
xMLEventConsumer
)

Implements javax.xml.stream.util.XMLEventAllocator.allocate.

This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in. This method can be used to expand or contract reader states into event states.

protected void
protected void
protected void
protected XMLEvent
private QName
pack-priv XMLEvent
public XMLEventAllocator
newInstance()

Implements javax.xml.stream.util.XMLEventAllocator.newInstance.

This method creates an instance of the XMLEventAllocator.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XMLEventAllocatorImplback to summary
public XMLEventAllocatorImpl()

Creates a new instance of XMLEventAllocator

Method Detail

allocateback to summary
public XMLEvent allocate(XMLStreamReader xMLStreamReader) throws XMLStreamException

Implements javax.xml.stream.util.XMLEventAllocator.allocate.

Doc from javax.xml.stream.util.XMLEventAllocator.allocate.

This method allocates an event given the current state of the XMLStreamReader. If this XMLEventAllocator does not have a one-to-one mapping between reader states and events this method will return null. This method must not modify the state of the XMLStreamReader.

Parameters
xMLStreamReader:XMLStreamReader

The XMLStreamReader to allocate from

Returns:XMLEvent

the event corresponding to the current reader state

Exceptions
XMLStreamException:
if an error occurs
allocateback to summary
public void allocate(XMLStreamReader xMLStreamReader, XMLEventConsumer xMLEventConsumer) throws XMLStreamException

Implements javax.xml.stream.util.XMLEventAllocator.allocate.

Doc from javax.xml.stream.util.XMLEventAllocator.allocate.

This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in. This method can be used to expand or contract reader states into event states. This method may modify the state of the XMLStreamReader.

Parameters
xMLStreamReader:XMLStreamReader

The XMLStreamReader to allocate from

xMLEventConsumer:XMLEventConsumer

The XMLEventConsumer to add to.

Exceptions
XMLStreamException:
if an error occurs
fillAttributesback to summary
protected void fillAttributes(StartElementEvent event, XMLStreamReader xmlr)
fillNamespaceAttributesback to summary
protected void fillNamespaceAttributes(StartElementEvent event, XMLStreamReader xmlr)
fillNamespaceAttributesback to summary
protected void fillNamespaceAttributes(EndElementEvent event, XMLStreamReader xmlr)
getNextEventback to summary
protected XMLEvent getNextEvent(XMLStreamReader streamReader) throws XMLStreamException
getQNameback to summary
private QName getQName(XMLStreamReader xmlr)
getXMLEventback to summary
pack-priv XMLEvent getXMLEvent(XMLStreamReader streamReader)
newInstanceback to summary
public XMLEventAllocator newInstance()

Implements javax.xml.stream.util.XMLEventAllocator.newInstance.

Doc from javax.xml.stream.util.XMLEventAllocator.newInstance.

This method creates an instance of the XMLEventAllocator. This allows the XMLInputFactory to allocate a new instance per reader.

Returns:XMLEventAllocator

an instance of the XMLEventAllocator

setNamespaceContextback to summary
private void setNamespaceContext(StartElementEvent event, XMLStreamReader xmlr)