public void setProperty(String key, String value) { configAll.replace(key, value); }
/** * Replace a value for a key. * A null for key or value is not allowed. * An empty string for a key is not allowed. * * @param key the key for the section * @param value the value for the key * @return {@code true} if the element was added or already was present */ public boolean replaceValue(String key, String value) { IniSection section = getSection(); return section == null || section.replace(key, value); }
/** * Replace a value for a key. * A null for key or value is not allowed. * An empty string for a key is not allowed. * * @param sectionName the name of the section * @param key the key for the section * @param value the value for the key * @return {@code true} if the element was added or already was present */ public boolean replace(String sectionName, String key, String value) { IniSection section = getOrCreateSection(sectionName); return section.replace(key, value); }
config.replace(key, value); try { config.save(new File(writeLocation, bookConf), getBookCharset());