Example usage for org.apache.commons.configuration.io FileHandler load

List of usage examples for org.apache.commons.configuration.io FileHandler load

Introduction

In this page you can find the example usage for org.apache.commons.configuration.io FileHandler load.

Prototype

private void load(FileLocator locator) throws ConfigurationException 

Source Link

Document

Internal helper method for loading the associated file from the location specified in the given FileLocator .

Usage

From source file:ubic.gemma.web.util.ConfigurationCookie.java

/**
 * Used when loading cookies from the user.
 *
 * @param cookie Must have been originally created as a ConfigurationCookie (or look just like one).
 * @throws ConfigurationException if the cookie cannot be converted.
 *///from  w ww.j  a v a 2s.  c om
public ConfigurationCookie(Cookie cookie) throws ConfigurationException {
    super(cookie.getName(), cookie.getValue());

    // turn the value into properties.
    StringReader reader = new StringReader(this.getValue().replaceAll(PROPERTY_DELIMITER, "\n"));
    configuration = new PropertiesConfiguration();
    FileHandler fh = new FileHandler(configuration);
    fh.load(reader);
}