Package 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.XMLEventAllocatorReturn a single event for each allocate call
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFEATURE_STAX_ENTITIESstatic java.lang.StringFEATURE_STAX_NOTATIONS
-
Constructor Summary
Constructors Constructor Description StaticAllocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.xml.stream.events.XMLEventallocate(javax.xml.stream.XMLStreamReader reader)This method allocates an event given the current state of the XMLStreamReader.voidallocate(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.CharactersallocateCData(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.CharactersallocateCharacters(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.CommentallocateComment(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.DTDallocateDTD(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.EndDocumentallocateEndDocument(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.EndElementallocateEndElement(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.EntityReferenceallocateEntityReference(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.ProcessingInstructionallocatePI(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.CharactersallocateSpace(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.StartDocumentallocateStartDocument(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.StartElementallocateStartElement(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.events.StartDocumentallocateXMLDeclaration(javax.xml.stream.XMLStreamReader reader)javax.xml.stream.util.XMLEventAllocatornewInstance()This method creates an instance of the XMLEventAllocator.java.lang.StringtoString()
-
-
-
Field Detail
-
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
-
-
Method Detail
-
newInstance
public javax.xml.stream.util.XMLEventAllocator newInstance()
Description copied from interface:javax.xml.stream.util.XMLEventAllocatorThis method creates an instance of the XMLEventAllocator. This allows the XMLInputFactory to allocate a new instance per reader.- Specified by:
newInstancein interfacejavax.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.XMLStreamExceptionDescription copied from interface:javax.xml.stream.util.XMLEventAllocatorThis 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:
allocatein interfacejavax.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.XMLStreamExceptionDescription copied from interface:javax.xml.stream.util.XMLEventAllocatorThis 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:
allocatein interfacejavax.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:
toStringin classjava.lang.Object
-
-