return new Configuration(this, properties);
}
private static Map<String, String> loadFile(final String fileName) throws IOException {
LumifyLogger LOGGER = LumifyLoggerFactory.getLogger(FileConfigurationLoader.class);
Map<String, String> results = new HashMap<String, String>();
LOGGER.info("Loading config file: %s", fileName);
FileInputStream in = new FileInputStream(fileName);
try {
Properties properties = new Properties();
properties.load(in);
for (Map.Entry<Object, Object> prop : properties.entrySet()) {
String key = prop.getKey().toString();
String value = prop.getValue().toString();
results.put(key, value);
}
} catch (Exception e) {
LOGGER.info("Could not load configuration file: %s", fileName);
} finally {
in.close();
}
return results;
}