Java Path File Read nio loadFromFile(Path path)

Here you can find the source of loadFromFile(Path path)

Description

load From File

License

Open Source License

Declaration

public static Properties loadFromFile(Path path) throws IOException 

Method Source Code


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

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Properties;

public class Main {
    public static Properties loadFromFile(Path path) throws IOException {
        Properties props = new Properties();
        props.load(Files.newInputStream(path));
        return props;
    }/*from   w  w w.  j  a  va 2 s.co  m*/
}

Related

  1. load(Path p, PrintStream errorStream, String propertyInfo)
  2. loadFile(final Path filePath)
  3. loadFile(final Path p)
  4. loadFile(Path file)
  5. loadFile(String path)
  6. loadJSON(Path path)
  7. loadProperties(Path filePath)
  8. loadProperties(Supplier classLoader, String classpathResource)
  9. loadStrings(Path thePath)