Java Properties Load from File loadProperties(Properties properties, File file)

Here you can find the source of loadProperties(Properties properties, File file)

Description

load Properties

License

Apache License

Declaration

public static Properties loadProperties(Properties properties, File file) throws IOException 

Method Source Code


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

import java.io.*;

import java.util.*;

public class Main {
    public static Properties loadProperties(Properties properties, File file) throws IOException {
        try (InputStream propertiesStream = new FileInputStream(file)) {
            return loadProperties(properties, propertiesStream);
        }/* w  w  w  .  ja v a 2s  . c om*/
    }

    public static Properties loadProperties(Properties properties, InputStream inputStream) throws IOException {
        properties.load(inputStream);
        return properties;
    }
}

Related

  1. loadProperties(final String fileName)
  2. loadProperties(final ZipFile file, final ZipEntry ze)
  3. loadProperties(JarFile enclosedJarFile, String jarEntryPath)
  4. loadProperties(Map map, File file, String encoding)
  5. loadProperties(ProcessingEnvironment env, String fileName)
  6. loadProperties(Properties properties, File propertyFile)
  7. loadProperties(Properties properties, File propertyFile)
  8. loadProperties(String configFilePath)
  9. loadProperties(String configurationFileProperty, String configurationFileDefault)