Here you can find the source of loadProperties(Properties properties, File file)
public static Properties loadProperties(Properties properties, File file) throws IOException
//package com.java2s; //License from project: Apache License import java.io.*; import java.util.*; public class Main { public static Properties loadProperties(Properties properties, File file) throws IOException { try (InputStream propertiesStream = new FileInputStream(file)) { return loadProperties(properties, propertiesStream); }/* w w w . ja v a 2s . c om*/ } public static Properties loadProperties(Properties properties, InputStream inputStream) throws IOException { properties.load(inputStream); return properties; } }