Here you can find the source of load(String file)
Parameter | Description |
---|---|
file | The file containing the properties |
Parameter | Description |
---|
Properties
object
static public Properties load(String file) throws FileNotFoundException, IOException
//package com.java2s; // it under the terms of the GNU Lesser General Public License as published by import java.util.*; import java.io.*; public class Main { /**/*w ww .ja v a 2 s . c om*/ * @param file The file containing the properties * @return A <code>Properties</code> object * @throws java.io.FileNotFoundException * @throws java.io.IOException */ static public Properties load(String file) throws FileNotFoundException, IOException { Properties properties = new Properties(); FileInputStream in = new FileInputStream(file); properties.load(in); in.close(); return properties; } }