Here you can find the source of loadFromURL(URL url)
public static Properties loadFromURL(URL url) throws MalformedURLException, IOException
//package com.java2s; //License from project: Apache License import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Properties; public class Main { public static Properties loadFromURL(URL url) throws MalformedURLException, IOException { Properties result = new Properties(); InputStream is = null;// www .j a v a 2s . com try { is = url.openStream(); result.load(is); } finally { if (is != null) { is.close(); } } return result; } public static Properties load(String fileName) throws IOException { InputStream is = null; try { Properties props = new Properties(); is = new FileInputStream(fileName); props.load(is); return props; } finally { if (is != null) { is.close(); } } } }