Interface FileMutableConfig

All Superinterfaces:
Config, MutableConfig
All Known Subinterfaces:
FileWatchableConfig
All Known Implementing Classes:
JsonMutableConfigImpl, PropertiesMutableConfigImpl, XmlMutableConfigImpl, YamlMutableConfigImpl

@API(status=STABLE, since="1.0") public interface FileMutableConfig extends MutableConfig
Configuration properties provider with properties mutable at runtime.
Since:
1.0
Version:
1.0, 2015-10
Author:
(w) Iker Hernaez
See Also:
  • Method Details

    • save

      default void save(@NotNull @NotNull File destination) throws IOException
      Saves the configuration properties to the specified destination file. If the file format requires it, the saved file will have the default encoding (usually UTF-8).
      Parameters:
      destination - The destination file.
      Throws:
      IOException - If an I/O error occurs.
    • save

      default void save(@NotNull @NotNull Path destination) throws IOException
      Saves the configuration properties to the specified destination path. If the file format requires it, the saved file will have the default encoding (usually UTF-8).
      Parameters:
      destination - The destination path.
      Throws:
      IOException - If an I/O error occurs.
    • save

      default void save(@NotNull @NotNull OutputStream destination) throws IOException
      Saves the configuration properties to the specified output stream. If the file format requires it, the saved content will be encoded using the default encoding (usually UTF-8).
      Parameters:
      destination - The destination output stream.
      Throws:
      IOException - If an I/O error occurs.
    • save

      default void save(@NotNull @NotNull OutputStream destination, @NotNull @NotNull Charset encoding) throws IOException
      Saves the configuration properties to the specified output stream using the specified encoding.
      Parameters:
      destination - The destination output stream.
      encoding - The encoding to use.
      Throws:
      IOException - If an I/O error occurs.
    • save

      void save(@NotNull @NotNull Writer destination) throws IOException
      Saves the configuration properties to the specified writer.
      Parameters:
      destination - The destination writer.
      Throws:
      IOException - If an I/O error occurs.