Interface StreamWriterMetadataExtension

    • Method Detail

      • metadata

        void metadata​(ImmutableMap<QName,​Object> metadata)
               throws IOException
        Emit a block of metadata associated with the currently-open node. The argument is a map of annotation names, as defined md:annotation extension. Values are normalized objects, which are required to be effectively-immutable.
        Parameters:
        metadata - Metadata block
        Throws:
        NullPointerException - if metadata is null
        IllegalStateException - when this method is invoked outside of an open node or metadata has already been emitted.
        IOException - if an underlying IO error occurs
      • requireMetadataFirst

        default boolean requireMetadataFirst()
        Indicate whether metadata is required to be emitted just after an entry is open. The default implementation returns false.
        Returns:
        True if metadata must occur just after the start of an entry.