Class AbstractWriter

    • Constructor Detail

      • AbstractWriter

        protected AbstractWriter​(String xmlTag,
                                 String kvnTag)
        Simple constructor.
        Parameters:
        xmlTag - name of the XML tag surrounding the section
        kvnTag - name of the KVN tag surrounding the section (may be null)
    • Method Detail

      • write

        public void write​(Generator generator)
                   throws IOException
        Write the section, including surrounding tags.
        Parameters:
        generator - generator to use for producing output
        Throws:
        IOException - if any buffer writing operations fails
      • enterSection

        public void enterSection​(Generator generator)
                          throws IOException
        Enter the section.
        Parameters:
        generator - generator to use for producing output
        Throws:
        IOException - if an I/O error occurs.
        Since:
        12.0
      • exitSection

        public void exitSection​(Generator generator)
                         throws IOException
        Exit the section.
        Parameters:
        generator - generator to use for producing output
        Throws:
        IOException - if an I/O error occurs.
        Since:
        12.0
      • writeContent

        protected abstract void writeContent​(Generator generator)
                                      throws IOException
        Write the content of the section, excluding surrounding tags.
        Parameters:
        generator - generator to use for producing output
        Throws:
        IOException - if any buffer writing operations fails
      • intArrayToString

        protected String intArrayToString​(int[] integers)
        Convert an array of integer to a comma-separated list.
        Parameters:
        integers - integers to write
        Returns:
        arrays as a string