Package loci.common

Class IniWriter

java.lang.Object
loci.common.IniWriter

public class IniWriter extends Object
A simple writer for INI configuration files.
Author:
Melissa Linkert melissa at glencoesoftware.com
  • Constructor Details

    • IniWriter

      public IniWriter()
  • Method Details

    • saveINI

      public void saveINI(IniList ini, String path) throws IOException
      Saves the given IniList to the given file. If the given file already exists, then the IniList will be appended.
      Parameters:
      ini - the IniList to be written
      path - the path to a writable file on disk
      Throws:
      IOException - if there is an error during writing
    • saveINI

      public void saveINI(IniList ini, String path, boolean append, boolean sorted) throws IOException
      Saves the given IniList to the given file.
      Parameters:
      ini - the IniList to be written
      path - the path to a writable file on disk
      append - true if the INI data should be appended to the end of the file if it already exists
      sorted - true if the INI keys should be sorted before writing
      Throws:
      IOException - if there is an error during writing
    • saveINI

      public void saveINI(IniList ini, String path, boolean append) throws IOException
      Saves the given IniList to the given file.
      Parameters:
      ini - the IniList to be written
      path - the path to a writable file on disk
      append - true if the INI data should be appended to the end of the file if it already exists
      Throws:
      IOException - if there is an error during writing