Package org.more.util.map

Examples of org.more.util.map.Properties.load()


    /**读取一个属性文件,并且以{@link Map}接口的形式返回。*/
    public static Map<String, String> getPropertys(final String resourcePath) throws IOException {
        Properties prop = new Properties();
        InputStream in = ResourcesUtils.getResourceAsStream(ResourcesUtils.formatResource(resourcePath));
        if (in != null) {
            prop.load(in);
        }
        return prop;
    }
    /**获取classpath中可能存在的资源。*/
    public static URL getResource(String resourcePath) throws IOException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.