Here you can find the source of loadPropertiesFromPath(String propsFilePath)
public static Properties loadPropertiesFromPath(String propsFilePath) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; import java.util.*; public class Main { public static Properties loadPropertiesFromPath(String propsFilePath) throws IOException { InputStream is = null;//from ww w . ja v a 2 s . c om try { is = new BufferedInputStream(new FileInputStream(propsFilePath)); Properties props = new Properties(); props.load(is); return props; } finally { close(is); } } public static void close(Reader in) { try { in.close(); } catch (Exception x) { // ignore } } public static void close(Writer out) { try { out.close(); } catch (Exception x) { // ignore } } public static void close(InputStream in) { try { in.close(); } catch (Exception x) { // ignore } } public static void close(OutputStream os) { try { os.close(); } catch (Exception x) { // no op } } }