Java Properties Load from File loadPropertiesFile(String propFilePath)

Here you can find the source of loadPropertiesFile(String propFilePath)

Description

load Properties File

License

Apache License

Declaration

public static Properties loadPropertiesFile(String propFilePath)
            throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Main {
    public static Properties loadPropertiesFile(String propFilePath)
            throws IOException {
        try (InputStream input = new FileInputStream(propFilePath)) {
            return loadPropertiesStream(input);
        }// w ww  .  java2 s .  c om
    }

    public static Properties loadPropertiesStream(InputStream input)
            throws IOException {
        Properties prop = new Properties();
        prop.load(input);
        return prop;
    }
}

Related

  1. loadPropertiesFile(String filePath)
  2. loadPropertiesFile(String filePath)
  3. loadPropertiesFile(String path)
  4. loadPropertiesFile(String propertiesFileName)
  5. loadPropertiesFile(String propFile)
  6. loadPropertiesFromClasspath( final String filename)
  7. loadPropertiesFromClasspath(Class loadResourceClass, String classpath)
  8. loadPropertiesFromClasspath(String pfname)
  9. loadPropertiesFromFile(Class clazz, String filePath)