List of usage examples for org.apache.commons.configuration.builder FileBasedBuilderParametersImpl FileBasedBuilderParametersImpl
public FileBasedBuilderParametersImpl()
From source file:ubic.basecode.util.ConfigUtils.java
/** * @param file/*from w w w .java2 s.com*/ * @return */ public static FileBasedConfigurationBuilder<PropertiesConfiguration> getConfigBuilder(File file) throws ConfigurationException { if (!file.exists()) { try { FileTools.touch(file); } catch (IOException e) { throw new ConfigurationException("Couldn't create the file: " + e.getMessage()); } } FileBasedConfigurationBuilder<PropertiesConfiguration> builder = new FileBasedConfigurationBuilder<PropertiesConfiguration>( PropertiesConfiguration.class); builder.configure(new FileBasedBuilderParametersImpl().setFile(file)); return builder; }