Java Properties Load from File load(String fileName)

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

Description

load

License

Apache License

Declaration

public static Properties load(String fileName) throws IOException 

Method Source Code

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

import java.io.FileInputStream;

import java.io.IOException;
import java.io.InputStream;

import java.util.Properties;

public class Main {
    public static Properties load(String fileName) throws IOException {
        InputStream is = null;/*  w  w  w  .j a  v a2  s.  c  o  m*/
        try {
            Properties props = new Properties();
            is = new FileInputStream(fileName);
            props.load(is);
            return props;
        } finally {
            if (is != null) {
                is.close();
            }
        }
    }
}

Related

  1. load(Properties props, String filename)
  2. load(String file)
  3. load(String file)
  4. load(String fileName)
  5. load(String filename)
  6. load(String filename)
  7. load(String filename)
  8. load(String fileName)
  9. load(String path)