Here you can find the source of loadPropertiesFromFile(String pathname)
protected static Properties loadPropertiesFromFile(String pathname) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; public class Main { protected static Properties loadPropertiesFromFile(String pathname) throws IOException { Properties properties = new Properties(); if (pathname == null || pathname.length() == 0) return properties; FileInputStream in = null; in = new FileInputStream(pathname); if (in != null) { properties.load(in);/*from w w w .j a va 2 s.co m*/ in.close(); } return properties; } }