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

info.hargrave.configuration.ConfigurationMedium Maven / Gradle / Ivy

The newest version!
package info.hargrave.configuration;

import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;

/**
 * Defines access to a medium for configuration storage
 * Date: 10/24/13
 * Time: 10:44 PM
 */
public interface ConfigurationMedium {

    /**
     * Commit the configuration to the medium
     * @param configuration configuration data map
     * @throws IOException if the commit should fail for any reason
     */
    public void commitConfiguration(HashMap configuration) throws IOException;

    /**
     * Read the configuration from the medium
     * @return configuration data map
     * @throws IOException if the read should fail for any reason
     */
    public HashMap readConfiguration() throws IOException, ClassNotFoundException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy