Here you can find the source of loadProperties(InputStream inputStream, Properties result)
private static void loadProperties(InputStream inputStream, Properties result) throws BackingStoreException, IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Ericsson 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 * * Contributors:/*w w w . j a va 2 s . c om*/ * Ericsson - initial API and implementation *******************************************************************************/ import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import org.osgi.service.prefs.BackingStoreException; public class Main { /** * ADD THIS METHOD FOR TESTING WITH ECLIPSE 3.5 * */ private static void loadProperties(InputStream inputStream, Properties result) throws BackingStoreException, IOException { //Properties result = new Properties(); InputStream input = null; try { input = new BufferedInputStream(inputStream); result.load(input); } finally { if (input != null) { input.close(); input = null; //FileUtil.safeClose(input); } } //return result; } }