Preferences newIniPreferences()

in src/main/java/org/ini4j/IniPreferencesFactory.java [113:131]


    Preferences newIniPreferences(String key)
    {
        Ini ini = new Ini();
        String location = getIniLocation(key);

        if (location != null)
        {
            try
            {
                ini.load(getResourceAsStream(location));
            }
            catch (Exception x)
            {
                throw new IllegalArgumentException(x);
            }
        }

        return new IniPreferences(ini);
    }