Example usage for org.apache.commons.configuration2.io FileLocatorUtils fileLocator

List of usage examples for org.apache.commons.configuration2.io FileLocatorUtils fileLocator

Introduction

In this page you can find the example usage for org.apache.commons.configuration2.io FileLocatorUtils fileLocator.

Prototype

public static FileLocator.FileLocatorBuilder fileLocator() 

Source Link

Document

Returns an uninitialized FileLocatorBuilder which can be used for the creation of a FileLocator object.

Usage

From source file:com.virtlink.commons.configuration2.jackson.BuiltInXmlConfigurationTests.java

@Override
protected XMLConfiguration create(final Map<String, Object> properties) throws ConfigurationException {
    final XMLConfiguration configuration = new XMLConfiguration();
    configuration.initFileLocator(FileLocatorUtils.fileLocator().create());
    return configuration;
}

From source file:nl.imvertor.common.wrapper.XMLConfiguration.java

public Transformer createTransformer() throws ConfigurationException {
    FileLocatorBuilder builder = FileLocatorUtils.fileLocator();
    builder.basePath(Configurator.getInstance().getConfigFilepath());
    builder.encoding("UTF-8");
    FileLocator locator = new FileLocator(builder);
    initFileLocator(locator);/*from  w  w  w .j a v a2s . c  o  m*/
    return super.createTransformer();
}