Java Properties Load from File loadProperties(final File f)

Here you can find the source of loadProperties(final File f)

Description

load Properties

License

Open Source License

Parameter

Parameter Description
f property file to load

Exception

Parameter Description
IOException property file not found

Return

loaded property file

Declaration

public static Properties loadProperties(final File f) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;
import java.io.FileInputStream;

import java.io.IOException;

import java.util.Properties;

public class Main {
    /**//from w w  w  . j a v a  2s  . c o  m
     * @param f property file to load
     * @return loaded property file
     * @throws IOException property file not found
     */
    public static Properties loadProperties(final File f) throws IOException {

        Properties properties = new Properties();
        properties.load(new FileInputStream(f));

        return properties;
    }
}

Related

  1. loadProperties(File fileName)
  2. loadProperties(File path)
  3. loadProperties(File propertyFile)
  4. loadProperties(File propertyFile, Properties properties)
  5. loadProperties(final Class clasz, final String propertiesFilename)
  6. loadProperties(final File propertiesFile)
  7. loadProperties(final String file)
  8. loadProperties(final String fileName)
  9. loadProperties(final ZipFile file, final ZipEntry ze)