Example usage for java.util Properties values

List of usage examples for java.util Properties values

Introduction

In this page you can find the example usage for java.util Properties values.

Prototype

@Override
    public Collection<Object> values() 

Source Link

Usage

From source file:uk.ac.sanger.cgp.dbcon.util.Settings.java

protected static List getConfigLocationsFromPropertiesFile() {
    Resource resource = new ClasspathResource(PROPERTIES_LOCATION);
    InputStream resourceInputStream = null;

    try {/*from   w  w w .  j  a v a 2s  .c o  m*/
        resourceInputStream = resource.getInputStream();
    } catch (DbConException e) {
        return Collections.EMPTY_LIST;
    }

    Properties props = new Properties();

    try {
        props.load(resourceInputStream);
    } catch (IOException e) {
        throw new DbConException("Could not load properties from " + PROPERTIES_LOCATION, e);
    } finally {
        InputOutputUtils.closeQuietly(resourceInputStream);
    }

    return new ArrayList(props.values());
}