资 源 简 介
A configuration library that aims at extreme simplicity of use and still is very powerful.
Features:
Section based configuration. A configuration has sections and sections hold parameters.
Out of the box support for the following file formats for configuration sources:
ini.
properties.
XML (TBD).
Supports different charsets/encodings.
Has a reflection wrapper that fills user objects with values from the configuration.
Simple example for reading a parameter:
IniConfiguration iniConfig = new IniConfiguration(new File("my.ini"));String hostName = iniConfig.getSection("network").getString("serverHostName");
Simple example for setting a parameter:
IniConfiguration iniConfig = new IniConfiguration(new File("my.ini"));iniConfig.getSection("network").setInt("port", 2525);