SIP & Performance

Open-source assets, tools and production-ready components for telecom builders

ConfIO

ConfIO is a lightweight, easy-to-use Java library for loading and parsing INI-style configuration files. It provides a universal parser with hierarchical and ordered sections (key-value, text, JSON), type-safe accessors, profile/environment overrides, comment handling, and optional hot-reload with listener notifications.

Features

Requirements

Installation


<dependency>
    <groupId>com.siperf</groupId>
    <artifactId>confio</artifactId>
    <version>0.3.0</version>
</dependency>

Quick start


import java.nio.file.Path;
import com.siperf.confio.*;
import com.siperf.confio.sections.*;

// Load configuration from file
ConfigurationFile config = ConfigurationFileLoader.load(Path.of("config.ini"));

// Get global parameters (general section)
String serverNumber = config.getGlobalParameter("server.number");

// Get a named section
if (config.hasSection("database")) {
  KeyValueSection db = config.getSection("database", KeyValueSection.class);
  String driver = db.getParameter("driver.classname");
  boolean enabled = Boolean.parseBoolean(db.getParameter("enabled"));
}

License

Links