Android Reader Read readFileReader(String filePath)

Here you can find the source of readFileReader(String filePath)

Description

read File Reader

Declaration

public static Reader readFileReader(String filePath) throws IOException 

Method Source Code

//package com.java2s;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

import java.io.IOException;
import java.io.InputStreamReader;

import java.io.Reader;

public class Main {

    public static Reader readFileReader(String filePath) throws IOException {
        File file = new File(filePath);
        FileInputStream fileInputStream = null;
        try {//from  w w  w .ja  v a2s  . c o m
            fileInputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw e;
        }
        return new InputStreamReader(fileInputStream);
    }
}

Related

  1. copy(Reader input, OutputStream output)
  2. copy(Reader input, Writer output)
  3. readContents(Reader in)
  4. readFile(String filename)
  5. readTextFile(String fileName)
  6. slurpLines(final Reader reader)
  7. slurpValidLines(final Reader reader)
  8. toList(Reader reader)