All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tools.Config Maven / Gradle / Ivy

There is a newer version: 0.0.3.6
Show newest version
package tools;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Config {

    private Properties properties = new Properties();

    public Config(String filePath) {
        try {
            InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filePath);
            properties.load(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String get(String key) {
        return properties.getProperty(key);
    }

    public void set(String key, String value) {
        properties.setProperty(key, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy