如何使用 Ini4J写ini文件

如何使用 Ini4J写ini文件

http://ini4j.sourceforge.net/tutorial/IniTutorial.java.html

 

 void sample01(Ini ini)
    {
        Ini.Section section = ini.get("happy");

        //
        // read some values
        //
        String age = section.get("age");
        String weight = section.get("weight");
        String homeDir = section.get("homeDir");

        //
        // .. or just use java.util.Map interface...
        //
        Map<String, String> map = ini.get("happy");

        age = map.get("age");
        weight = map.get("weight");
        homeDir = map.get("homeDir");

        // get all section names
        Set<String> sectionNames = ini.keySet();

 

posted @ 2019-09-02 12:40  bH1pJ  阅读(50)  评论(0编辑  收藏  举报