Example usage for org.apache.commons.configuration XMLConfiguration getURL

List of usage examples for org.apache.commons.configuration XMLConfiguration getURL

Introduction

In this page you can find the example usage for org.apache.commons.configuration XMLConfiguration getURL.

Prototype

public URL getURL() 

Source Link

Usage

From source file:org.jkcsoft.java.util.ConfigHelper.java

/**
 * @param config//from w  w w . jav  a2 s. co  m
 */
public String getConfFilePath(XMLConfiguration config) {
    String path = "null config";
    if (config != null) {
        if (config.getFile() != null) {
            try {
                path = config.getFile().getCanonicalPath();
            } catch (IOException e) {
                path = e.getMessage();
            }
        } else if (config.getURL() != null) {
            path = config.getURL().toString();
        }
    }
    return path;
}