Java Properties Load loadProperties(String resource)

Here you can find the source of loadProperties(String resource)

Description

load Properties

License

Artistic License

Declaration

public static Properties loadProperties(String resource)
            throws IOException 

Method Source Code

//package com.java2s;
//License from project: Artistic License 

import java.io.IOException;
import java.util.Properties;

public class Main {
    public static Properties loadProperties(String resource)
            throws IOException {
        Properties props = new Properties();
        fillProperties(props, resource);
        return props;
    }/*from   w w  w . j  a va  2 s .c  o m*/

    public static void fillProperties(Properties props, String resource)
            throws IOException {
        props.load(Thread.currentThread().getContextClassLoader()
                .getResourceAsStream(resource));
    }
}

Related

  1. loadProperties(String conf)
  2. loadProperties(String name, ClassLoader loader)
  3. loadProperties(String properties)
  4. loadProperties(String properties)
  5. loadProperties(String propertyName)
  6. loadProperties(String resourceName)
  7. loadProperties(String resourceName, ClassLoader classLoader)
  8. loadPropertiesFromResource(ClassLoader clsLoader, String resourcePath)
  9. loadPropertiesFromResource(String name)