Java Properties Load from File load(final String folder, final String fileName)

Here you can find the source of load(final String folder, final String fileName)

Description

load

License

Apache License

Parameter

Parameter Description
fileName a parameter

Exception

Parameter Description
IOException an exception

Declaration

public static Properties load(final String folder, final String fileName) throws IOException 

Method Source Code

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

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import java.util.Properties;

public class Main {
    /**/*from ww w .  j av  a  2 s  .  co m*/
     * @param fileName
     * @return
     * @throws IOException
     */
    public static Properties load(final String folder, final String fileName) throws IOException {
        final Properties properties = new Properties();
        try (InputStream in = new FileInputStream(new File(folder, fileName))) {
            properties.load(in);
        }
        return properties;
    }
}

Related

  1. load(File file)
  2. load(File file, Properties data)
  3. load(File propertiesFile)
  4. load(final Class key, final String env, final Properties defaults)
  5. load(final Properties props, final Properties toLoad)
  6. load(InputStream in)
  7. load(InputStream input)
  8. load(InputStream inputStream)
  9. load(InputStream is)