List of usage examples for org.apache.commons.configuration.io FileHandler setFile
public void setFile(File file)
From source file:ubic.basecode.util.ConfigUtils.java
/** * @param file//from w ww . j a v a 2 s . co m * @return * @throws ConfigurationException */ public static PropertiesConfiguration loadConfig(File file) throws ConfigurationException { if (!file.exists()) { try { FileTools.touch(file); } catch (IOException e) { throw new ConfigurationException("Couldn't create the file: " + e.getMessage()); } } PropertiesConfiguration pc = new PropertiesConfiguration(); FileHandler handler = new FileHandler(pc); handler.setFile(file); handler.load(); return pc; }