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.
-
Constructor Details
-
IniWriter
public IniWriter()
-
-
Method Details
-
saveINI
Saves the given IniList to the given file. If the given file already exists, then the IniList will be appended.- Parameters:
ini
- theIniList
to be writtenpath
- 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.IOExceptionSaves the given IniList to the given file.- Parameters:
ini
- theIniList
to be writtenpath
- the path to a writable file on diskappend
- true if the INI data should be appended to the end of the file if it already existssorted
- true if the INI keys should be sorted before writing- Throws:
java.io.IOException
- if there is an error during writing
-
saveINI
Saves the given IniList to the given file.- Parameters:
ini
- theIniList
to be writtenpath
- the path to a writable file on diskappend
- 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
-