Class UnopenedElementClosingEventWriter
java.lang.Object
org.springframework.batch.item.xml.stax.UnopenedElementClosingEventWriter
- All Implemented Interfaces:
XMLEventConsumer
,XMLEventWriter
Delegating XMLEventWriter, which writes EndElement events that match a given collection
of QNames directly to the underlying java.io.Writer instead of to the delegate
XMLEventWriter.
- Since:
- 3.0
- Author:
- Jimmy Praet
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUnopenedElementClosingEventWriter
(XMLEventWriter wrappedEventWriter, Writer ioWriter, List<QName> unopenedElements) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add
(XMLEventReader reader) void
close()
void
flush()
void
void
setNamespaceContext
(NamespaceContext context) void
-
Field Details
-
wrappedEventWriter
-
-
Constructor Details
-
UnopenedElementClosingEventWriter
public UnopenedElementClosingEventWriter(XMLEventWriter wrappedEventWriter, Writer ioWriter, List<QName> unopenedElements)
-
-
Method Details
-
add
- Specified by:
add
in interfaceXMLEventConsumer
- Specified by:
add
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
add
- Specified by:
add
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
close
- Specified by:
close
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
flush
- Specified by:
flush
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
getNamespaceContext
- Specified by:
getNamespaceContext
in interfaceXMLEventWriter
-
getPrefix
- Specified by:
getPrefix
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setDefaultNamespace
- Specified by:
setDefaultNamespace
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setNamespaceContext
- Specified by:
setNamespaceContext
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setPrefix
- Specified by:
setPrefix
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-