com.bea.xml.stream
Class StaticAllocator
java.lang.Object
com.bea.xml.stream.StaticAllocator
- All Implemented Interfaces:
- javax.xml.stream.util.XMLEventAllocator
public class StaticAllocator
- extends java.lang.Object
- implements javax.xml.stream.util.XMLEventAllocator
Return a single event for each allocate call
Method Summary |
javax.xml.stream.events.XMLEvent |
allocate(javax.xml.stream.XMLStreamReader reader)
This method allocates an event given the current
state of the XMLStreamReader. |
void |
allocate(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.util.XMLEventConsumer consumer)
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. |
javax.xml.stream.events.Characters |
allocateCData(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.Characters |
allocateCharacters(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.Comment |
allocateComment(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.DTD |
allocateDTD(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.EndDocument |
allocateEndDocument(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.EndElement |
allocateEndElement(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.EntityReference |
allocateEntityReference(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.ProcessingInstruction |
allocatePI(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.Characters |
allocateSpace(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.StartDocument |
allocateStartDocument(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.StartElement |
allocateStartElement(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.events.StartDocument |
allocateXMLDeclaration(javax.xml.stream.XMLStreamReader reader)
|
javax.xml.stream.util.XMLEventAllocator |
newInstance()
This method creates an instance of the XMLEventAllocator. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FEATURE_STAX_NOTATIONS
public static final java.lang.String FEATURE_STAX_NOTATIONS
- See Also:
- Constant Field Values
FEATURE_STAX_ENTITIES
public static final java.lang.String FEATURE_STAX_ENTITIES
- See Also:
- Constant Field Values
StaticAllocator
public StaticAllocator()
newInstance
public javax.xml.stream.util.XMLEventAllocator newInstance()
- Description copied from interface:
javax.xml.stream.util.XMLEventAllocator
- This method creates an instance of the XMLEventAllocator. This
allows the XMLInputFactory to allocate a new instance per reader.
- Specified by:
newInstance
in interface javax.xml.stream.util.XMLEventAllocator
allocateStartElement
public javax.xml.stream.events.StartElement allocateStartElement(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateEndElement
public javax.xml.stream.events.EndElement allocateEndElement(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateCharacters
public javax.xml.stream.events.Characters allocateCharacters(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateCData
public javax.xml.stream.events.Characters allocateCData(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateSpace
public javax.xml.stream.events.Characters allocateSpace(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateEntityReference
public javax.xml.stream.events.EntityReference allocateEntityReference(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocatePI
public javax.xml.stream.events.ProcessingInstruction allocatePI(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateComment
public javax.xml.stream.events.Comment allocateComment(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateStartDocument
public javax.xml.stream.events.StartDocument allocateStartDocument(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateEndDocument
public javax.xml.stream.events.EndDocument allocateEndDocument(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateDTD
public javax.xml.stream.events.DTD allocateDTD(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocateXMLDeclaration
public javax.xml.stream.events.StartDocument allocateXMLDeclaration(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
allocate
public javax.xml.stream.events.XMLEvent allocate(javax.xml.stream.XMLStreamReader reader)
throws javax.xml.stream.XMLStreamException
- Description copied from interface:
javax.xml.stream.util.XMLEventAllocator
- 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.
- Specified by:
allocate
in interface javax.xml.stream.util.XMLEventAllocator
- Parameters:
reader
- The XMLStreamReader to allocate from
- Returns:
- the event corresponding to the current reader state
- Throws:
javax.xml.stream.XMLStreamException
allocate
public void allocate(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.util.XMLEventConsumer consumer)
throws javax.xml.stream.XMLStreamException
- Description copied from interface:
javax.xml.stream.util.XMLEventAllocator
- 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.
- Specified by:
allocate
in interface javax.xml.stream.util.XMLEventAllocator
- Parameters:
reader
- The XMLStreamReader to allocate fromconsumer
- The XMLEventConsumer to add to.
- Throws:
javax.xml.stream.XMLStreamException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object