Here you can find the source of load(URL url)
private static Properties load(URL url)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * //ww w. j a v a 2s . co m * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.*; public class Main { private static Properties load(URL url) { Properties props = new Properties(); try { InputStream is = null; try { is = url.openStream(); props.load(is); } finally { if (is != null) is.close(); } } catch (IOException e) { // TODO consider logging here } return props; } }