@ThreadSafe public class DOMElementSerializer extends Object implements ItemSerializer<Element>, ItemCollectionSerializer<Element>
ItemSerializer that serializes the document element of the given
Element-based Item.
When used as an ItemCollectionSerializer, just serializes the first Item in the collection.
This will result in well-formed XML, but other items in the collection will simply be ignored.| Constructor and Description |
|---|
DOMElementSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
serialize(Item<Element> item,
OutputStream output)
Serializes the
Item to the given output stream. |
void |
serializeCollection(Collection<Item<Element>> items,
OutputStream output)
Serializes the collection of
Items to the given output stream. |
private final Logger log
public void serialize(@Nonnull Item<Element> item, @Nonnull OutputStream output)
Item to the given output stream.serialize in interface ItemSerializer<Element>item - Item to be serializedoutput - output stream to which the serialized Item will be writtenpublic void serializeCollection(@Nonnull Collection<Item<Element>> items, @Nonnull OutputStream output)
Items to the given output stream.serializeCollection in interface ItemCollectionSerializer<Element>items - Collection of Items to be serializedoutput - output stream to which the serialized form of the Item
collection will be writtenCopyright © 1999–2016. All rights reserved.