I'm new to ini4j
API http://mvnrepository.com/artifact/org.ini4j/ini4j. I have a requirement where if pass key
as CT
then it should check all section
and populate key value pair in Java Map
(like 10=CT,11=CT etc). How we can do this?
Cities are not fixed, it could be many cities. I've only shown 4 here.
My widget.ini
[CapeTown]
10=CT
11=CT
12=CT
13=JO
14=JO
15=CT
17=WN
[Wonderers]
21=CT
22=JO
23=WN
24=JO
25=CT
26=CT
27=CT
[Johanbege]
30=CT
31=CT
32=JO
33=JO
34=CT
35=CT
36=WN
[Durban]
40=CT
41=CT
42=JO
43=JO
44=CT
45=CT
46=WN
The code I started:
public class CityReader {
public static void main(String[] args) throws InvalidFileFormatException, IOException {
File file = new File("src/main/resources/widget.ini");
Ini ini = new Ini(file);
}
}