org.apache.qpid.info.util
Class IniFileReader
java.lang.Object
org.apache.qpid.info.util.IniFileReader
public class IniFileReader
- extends Object
This class is simple implementation of an ini file reader. It expects a
file with the following structure:
; global values, can be overwritten in sections
key1=value1
key2=value2
[Section1]
key1=value1_new ; overwriting the global key1
key3=value3
key4=value4
[Section2]
key5=value5
key6=value6
key7=value7
Note: Commentaries are preceded by ; or # and are supported throughout
A commentary line at the end of section is interpreted as
a section end marker
A structure (section name, associated properties)
is generated as a result of processing the ini file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IniFileReader
public IniFileReader()
load
public void load(String fileName)
throws IllegalArgumentException
- Loads and parses the ini file with the full path specified in the argument
- Parameters:
fileName
- Full path to the ini file
- Throws:
IllegalArgumentException
- If the file cannot be processed
getSections
public Map<String,Properties> getSections()
- Getter for the Sections Map
- Returns:
- Map The parsed content of the ini file in this structure
Licensed to the Apache Software Foundation