Java Path File Read nio newBufferedReader(Path path)

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

Description

new Buffered Reader

License

Open Source License

Declaration

public static BufferedReader newBufferedReader(Path path) 

Method Source Code


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

import java.io.BufferedReader;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;

import java.nio.file.Path;

public class Main {
    public static BufferedReader newBufferedReader(Path path) {
        return newBufferedReader(path, StandardCharsets.UTF_8);
    }/*from w  w  w.ja  v a 2 s .c om*/

    public static BufferedReader newBufferedReader(Path path, Charset cs) {
        try {
            return Files.newBufferedReader(path, cs);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. loadProperties(Supplier classLoader, String classpathResource)
  2. loadStrings(Path thePath)
  3. loadStringsFromFile(String pathToFile)
  4. loadTestPackets(final Path path)
  5. loadTitles(Path rootDir, Set container)
  6. newBufferedReader(Path path)
  7. openBufferedReader(String pathOrUrl)
  8. openForReadingAndWriting(String filePath)
  9. openResourceReader(Class resourceOrigin, String resourcePath)