Interface MessageWriter<H extends Header,​S extends Segment<?,​?>,​F extends NdmConstituent<H,​S>>

    • Method Detail

      • writeMessage

        default void writeMessage​(Generator generator,
                                  F message)
                           throws IOException
        Write one complete message.
        Parameters:
        generator - generator to use for producing output
        message - message to write
        Throws:
        IOException - if the stream cannot write to stream
      • writeHeader

        void writeHeader​(Generator generator,
                         H header)
                  throws IOException
        Write header for the file.
        Parameters:
        generator - generator to use for producing output
        header - header to write (creation date and originator will be added if missing)
        Throws:
        IOException - if the stream cannot write to stream
      • writeSegment

        void writeSegment​(Generator generator,
                          S segment)
                   throws IOException
        Write one segment.
        Parameters:
        generator - generator to use for producing output
        segment - segment to write
        Throws:
        IOException - if any buffer writing operations fails
      • writeFooter

        void writeFooter​(Generator generator)
                  throws IOException
        Write footer for the file.
        Parameters:
        generator - generator to use for producing output
        Throws:
        IOException - if the stream cannot write to stream
      • getRoot

        String getRoot()
        Get root element for XML files.
        Returns:
        root element for XML files
        Since:
        12.0
      • getFormatVersionKey

        String getFormatVersionKey()
        Get key for format version.
        Returns:
        key for format version
        Since:
        12.0
      • getVersion

        double getVersion()
        Get current format version.
        Returns:
        current format version
        Since:
        12.0