Package javanet.staxutils.helpers
Class ListEventConsumer
java.lang.Object
javanet.staxutils.helpers.ListEventConsumer
- All Implemented Interfaces:
XMLEventConsumer
XMLEventConsumer
that stores all added events in a List
.- Version:
- $Revision: 1.1 $
- Author:
- Christian Niles
-
Constructor Summary
ConstructorDescriptionListEventConsumer
(List events) Constructs an instance that adds events to the provided list. -
Method Summary
-
Constructor Details
-
ListEventConsumer
public ListEventConsumer() -
ListEventConsumer
Constructs an instance that adds events to the provided list.- Parameters:
events
- The list to which events will be added, ornull
.
-
-
Method Details
-
add
Adds the event to the internal list.- Specified by:
add
in interfaceXMLEventConsumer
- Throws:
XMLStreamException
-
getEvents
Returns theList
of events added to this consumer.- Returns:
- The
List
of events added to this consumer.
-
setEvents
Sets theList
to which events will be written.- Parameters:
events
- TheList
to which events will be written.
-
reset
public void reset()Removes all events from the internal list, making it available for reuse.
-