Java Properties Load from File load(String file)

Here you can find the source of load(String file)

Description

load

License

Open Source License

Parameter

Parameter Description
file The file containing the properties

Exception

Parameter Description

Return

A Properties object

Declaration

static public Properties load(String file)
        throws FileNotFoundException, IOException 

Method Source Code

//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;
    }
}

Related

  1. load(Properties props, Collection filters, File basedir)
  2. load(Properties props, File f)
  3. load(Properties props, File file)
  4. load(Properties props, String filename)
  5. load(String file)
  6. load(String filename)
  7. load(String filename)
  8. load(String fileName)
  9. load(String fileName)