Here you can find the source of load(File f)
public static Properties load(File f) throws IOException
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { public static void load(Properties props, File f) throws IOException { InputStream is = null;/*from w w w .j a v a 2s. co m*/ try { is = new FileInputStream(f); props.load(is); } finally { if (is != null) { is.close(); } } } public static void load(Properties props, InputStream is) throws IOException { try { props.load(is); } finally { is.close(); } } public static Properties load(File f) throws IOException { Properties p = new Properties(); load(p, f); return p; } }