INI files [Java]
- INI files
-
After years working on Microsoft Windows applications, it is hard to forget the INI file format and just doing the job with resource bundles.An Windows INI file may be considered as a hash of sections, each section containing independant keys:
[SectionA] key1=value1 key2=value2 [SectionB] key1=value3 key2=value4
The following Java implementation gives read and write access to such files.
- Usage
-
For a simple read access:
IniProperties ip = new IniProperties("test.ini"); String keyA1 = ip.getProperty("SectionA", "key1"); String keyB2 = ip.getProperty("SectionB", "key2");For updating an INI file:
IniProperties ip = new IniProperties("test.ini"); ip.setProperty("SectionA", "key3", "just added"); ip.saveAs("testCopy.ini");The Javadoc will fully describe the package.
- Download
-
The current version is 1.1.The ZIP file contains the source code, Jar file and Javadoc : IniFile.zip