Package loci.common

Class IniWriter

java.lang.Object
loci.common.IniWriter

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

    Constructors 
    Constructor Description
    IniWriter()  
  • Method Summary

    Modifier and Type Method Description
    void saveINI​(IniList ini, java.lang.String path)
    Saves the given IniList to the given file.
    void saveINI​(IniList ini, java.lang.String path, boolean append)
    Saves the given IniList to the given file.
    void saveINI​(IniList ini, java.lang.String path, boolean append, boolean sorted)
    Saves the given IniList to the given file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • saveINI

      public void saveINI​(IniList ini, java.lang.String path) throws java.io.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:
      java.io.IOException - if there is an error during writing
    • saveINI

      public void saveINI​(IniList ini, java.lang.String path, boolean append, boolean sorted) throws java.io.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:
      java.io.IOException - if there is an error during writing
    • saveINI

      public void saveINI​(IniList ini, java.lang.String path, boolean append) throws java.io.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:
      java.io.IOException - if there is an error during writing