Java Properties Load from File loadProperties(String sFile)

Here you can find the source of loadProperties(String sFile)

Description

Me-load file properties

License

Open Source License

Parameter

Parameter Description
sFile String path file sumber

Return

Objek Properties

Declaration

public static Properties loadProperties(String sFile) 

Method Source Code

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

import java.io.FileInputStream;

import java.io.IOException;

import java.util.Properties;

public class Main {
    /**/* w w w  .ja v  a 2  s. c  o  m*/
     * Me-load file properties
     * @param sFile String path file sumber
     * @return Objek Properties
     */
    public static Properties loadProperties(String sFile) {
        Properties p = new Properties();
        try {
            FileInputStream in = new FileInputStream(sFile);
            p.load(in);
            //         System.out.println("File berhasil di-load.....");
            in.close();
        } catch (IOException ex) {
            System.out.println(ex.getMessage());
        }
        return p;
    }
}

Related

  1. loadProperties(String propertiesFile)
  2. loadProperties(String propertiesFile)
  3. loadProperties(String propertyFile)
  4. loadProperties(String propertyPath)
  5. loadProperties(String propsFile)
  6. loadPropertiesFile(File file, boolean critical)
  7. loadPropertiesFile(final File file)
  8. loadPropertiesFile(String fileName)
  9. loadPropertiesFile(String fileName)