Class NormalizedMetadataWriter

java.lang.Object
org.opendaylight.yangtools.rfc7952.data.util.NormalizedMetadataWriter
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@Beta public final class NormalizedMetadataWriter extends Object implements Closeable, Flushable
A utility class to attach NormalizedMetadata into a NormalizedNode stream, such as the one produced by NormalizedNodeWriter, so that a target NormalizedNodeStreamWriter sees both data and metadata in the stream. A typical use would like this:

// Data for output NormalizedNode<?, ?> data; // Metadata for output NormalizedMetadata metadata; // Target output writer NormalizedNodeStreamWriter output = ...; // Metadata writer NormalizedMetadataStreamWriter metaWriter = NormalizedMetadataWriter.forStreamWriter(output); // Write a normalized node and its metadata dataWriter.write(data, metadata);

This class is NOT thread-safe.

Author:
Robert Varga