Interface XMLEventConsumer

All Known Subinterfaces:
XMLEventWriter

public interface XMLEventConsumer

This interface defines an event consumer interface. The contract of the of a consumer is to accept the event. This interface can be used to mark an object as able to receive events. Add may be called several times in immediate succession so a consumer must be able to cache events it hasn't processed yet.

Since:
1.6
Version:
1.0

Methods

Modifier and Type Method and Description
void add(XMLEvent event)

This method adds an event to the consumer.

Methods

add

void add(XMLEvent event)
  throws XMLStreamException

This method adds an event to the consumer. Calling this method invalidates the event parameter. The client application should discard all references to this event upon calling add. The behavior of an application that continues to use such references is undefined.

Parameters:
event - the event to add, may not be null
Throws:
XMLStreamException

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/javase/8/docs/api/javax/xml/stream/util/XMLEventConsumer.html