Java Properties Load from File loadParams(String fileName)

Here you can find the source of loadParams(String fileName)

Description

load Params

License

Apache License

Declaration

public static Properties loadParams(String fileName) 

Method Source Code

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

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

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

public class Main {
    public static Properties loadParams(String fileName) {
        Properties props = new Properties();
        try {/*ww  w .  j  a  v a2  s  .c om*/
            File f = new File(fileName);
            InputStream is = new FileInputStream(f);
            // Try loading properties from the file (if found)
            props.load(is);
        } catch (Exception e) {
        }
        return props;
    }
}

Related

  1. loadMimeTypes(InputStream inputStream)
  2. loadNative(File nativeLibsFolder)
  3. loadNecessaryPackagePrivateProperties(Class aClass, String aFileName)
  4. loadOSDependentLibrary()
  5. loadParamFromFile(String fileName, String param, String defValue)
  6. loadPriority()
  7. loadProperties(File directory, String propertiesFileName)
  8. loadProperties(File f)
  9. loadProperties(File file)