Java URL Load loadProperties(URL url)

Here you can find the source of loadProperties(URL url)

Description

load Properties

License

Apache License

Declaration

public static Properties loadProperties(URL url) 

Method Source Code

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

import java.io.InputStream;
import java.net.URL;

import java.util.Properties;

public class Main {
    public static Properties loadProperties(URL url) {
        //log.info("loadJNDIProperties() started: "+name);
        Properties props = null;/*from   ww  w. j a  va2s  .  c  o  m*/
        try {
            //log.info("loadJNDIProperties() opening file: "+name);
            InputStream stream = url.openStream();
            props = new Properties();
            //log.info("loadJNDIProperties() loading file: "+stream);
            props.load(stream);
        } catch (Exception e) {
            //log.error(e);
        } finally {
            //log.info(props);
        }
        //log.info("loadJNDIProperties() returns: "+props);
        return props;
    }
}

Related

  1. loadImplementations(URL url, ClassLoader loader)
  2. loadManifest(URL url)
  3. loadObject(URL url)
  4. loadProperties(final URL url)
  5. loadProperties(Properties p, URL url)
  6. loadProperties(URL url)
  7. loadPropertiesFromFileOrURL(String propertiesFile)
  8. loadPropertiesFromURL(URL url)
  9. loadProps(URL url, Properties props)