+ /**
+ * Read a normalized node from the reader, using specified writer to construct the result.
+ *
+ * @param writer Reusable writer to
+ * @return Next node from the stream, or null if end of stream has been reached.
+ * @throws IOException if an error occurs
+ * @throws IllegalStateException if the dictionary has been detached
+ */
+ default NormalizedNode<?, ?> readNormalizedNode(final ReusableImmutableNormalizedNodeStreamWriter writer)
+ throws IOException {
+ try {
+ streamNormalizedNode(writer);
+ return writer.getResult();
+ } finally {
+ writer.reset();
+ }
+ }
+