/*
 * Decompiled with CFR 0_123.
 */
package com.zakscode.FormulaManager;

import com.zakscode.FormulaManager.Logger;
import com.zakscode.FormulaManager.Main;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;

public class Configuration
extends Properties {
    private static final long serialVersionUID = 5884857151380277240L;
    private InputStream inputStream;
    private final String name;

    public Configuration() {
        this.name = "configuration.properties";
        try {
            this.inputStream = new FileInputStream(Main.baseDir + this.name);
            this.load(this.inputStream);
        }
        catch (IOException e) {
            Logger.write(e);
        }
        finally {
            try {
                this.inputStream.close();
            }
            catch (IOException e) {
                Logger.write(e);
            }
        }
    }

    public void save() {
        File f = new File(Main.baseDir + this.name);
        try {
            FileOutputStream out = new FileOutputStream(f);
            this.store(out, null);
        }
        catch (IOException e) {
            Logger.write(e);
        }
    }
}

