Interface ConfigWriter


public interface ConfigWriter
Interface for writing configurations.
  • Method Details

    • write

      void write(UnmodifiableConfig config, 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, OutputStream output, 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, 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, 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, Path file, WritingMode writingMode, 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, 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, File file, WritingMode writingMode, 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, 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 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