Java Properties Load from File loadPropertiesFile(String propertiesFileName)

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

Description

load Properties File

License

Apache License

Declaration

@SuppressWarnings("unchecked")
    static Map<String, String> loadPropertiesFile(String propertiesFileName) throws IOException 

Method Source Code


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

import java.io.*;
import java.util.Map;
import java.util.Properties;

public class Main {
    @SuppressWarnings("unchecked")
    static Map<String, String> loadPropertiesFile(String propertiesFileName) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileInputStream(propertiesFileName));
        return (Map) properties;
    }/* w ww. ja v  a 2 s.c  o  m*/
}

Related

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