SIni4j
Simple Ini Parser for Java or SIni4j is a simple INI parse made in Java, built for provide a simple and easiest way to load INI files in Java
Notes
- SIni4j don't parse/generate comments (Maybe on a future update)
Summary
Usage
- How to create an INI file:
//Create INI
Ini iniFile = new Ini();
//Creating a section with a key and value
iniFile.addSection("Section", "Key", "Value");
//Saving the file
iniFile.store(new File(".", "exemple.ini"));
- How to load an INI file:
//Create INI
Ini iniFile = new Ini(new File(".", "exemple.ini"));
//Getting a value from a section
String value = iniFile.getSection("Section").getString("Key");
//Modifying a value
iniFile.getSection("Section").add("Key", "NewValue");
//Saving the file
iniFile.store();
Download
Latest Release: GitHub Release
Maven
<repositories>
<repository>
<id>jitpack.ioid>
<url>https://jitpack.iourl>
repository>
repositories>
<dependency>
<groupId>com.github.synonwaregroupId>
<artifactId>SIni4jartifactId>
<version>VERSIONversion>
dependency>
<dependency>
Gradle
allprojects
{
repositories
{
maven { url 'https://jitpack.io' }
}
}
dependencies
{
implementation 'com.github.synonware:SIni4j:VERSION'
}