Interface ConfigWriter


  • public interface ConfigWriter
    Interface for writing configurations.
    • Method Detail

      • write

        void write​(UnmodifiableConfig config,
                   java.io.Writer writer)
        Writes a configuration.
        Parameters:
        config - the config to write
        writer - the writer to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.io.OutputStream output,
                           java.nio.charset.Charset charset)
        Writes a configuration.
        Parameters:
        config - the config to write
        output - the output to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.io.OutputStream output)
        Writes a configuration.
        Parameters:
        config - the config to write
        output - the output to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.nio.file.Path file,
                           WritingMode writingMode)
        Writes a configuration. The content of the file is overwritten. This method is equivalent to
        write(config, file, false)
        Parameters:
        config - the config to write
        file - the nio Path to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.nio.file.Path file,
                           WritingMode writingMode,
                           java.nio.charset.Charset charset)
        Writes a configuration.
        Parameters:
        config - the config to write
        file - the nio Path to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.io.File file,
                           WritingMode writingMode)
        Writes a configuration. The content of the file is overwritten. This method is equivalent to
        write(config, file, false)
        Parameters:
        config - the config to write
        file - the file to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.io.File file,
                           WritingMode writingMode,
                           java.nio.charset.Charset charset)
        Writes a configuration.
        Parameters:
        config - the config to write
        file - the file to write it to
        Throws:
        WritingException - if an error occurs
      • write

        default void write​(UnmodifiableConfig config,
                           java.net.URL url)
        Writes a configuration.
        Parameters:
        config - the config to write
        url - the url to write it to
        Throws:
        WritingException - if an error occurs
      • writeToString

        default java.lang.String writeToString​(UnmodifiableConfig config)
        Writes a configuration to a String.
        Parameters:
        config - the config to write
        Returns:
        a new String
        Throws:
        WritingException - if an error occurs