org.apache.cocoon.stax
Interface StAXProducer

All Superinterfaces:
PipelineComponent, Producer, StAXPipelineComponent
All Known Implementing Classes:
AbstractStAXProducer, AbstractStAXTransformer, CleaningTransformer, IncludeTransformer, SAXForStAXPipelineWrapper, XMLGenerator

public interface StAXProducer
extends Producer, StAXPipelineComponent

Extension of the cocoon Producer element for all StAX specific components. This interface extends the base Producer with three methods directly taken from the XMLEventReader interface which are required to implement a StAX component.


Method Summary
 boolean hasNext()
          Check if there are more events.
 XMLEvent nextEvent()
          Get the next XMLEvent
 XMLEvent peek()
          Check the next XMLEvent without reading it from the stream.
 
Methods inherited from interface org.apache.cocoon.pipeline.component.Producer
setConsumer
 
Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
finish, setConfiguration, setup
 

Method Detail

peek

XMLEvent peek()
              throws XMLStreamException
Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().

Throws:
XMLStreamException
See Also:
XMLEvent

hasNext

boolean hasNext()
                throws XMLStreamException
Check if there are more events. Returns true if there are more events and false otherwise.

Returns:
true if the event reader has more events, false otherwise
Throws:
XMLStreamException

nextEvent

XMLEvent nextEvent()
                   throws XMLStreamException
Get the next XMLEvent

Throws:
XMLStreamException
See Also:
XMLEvent


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.