Android BufferedReader Create readFileReturnBufferedReader( String filePath, String encoding)

Here you can find the source of readFileReturnBufferedReader( String filePath, String encoding)

Description

read File Return Buffered Reader

Declaration

public static BufferedReader readFileReturnBufferedReader(
        String filePath, String encoding) throws IOException 

Method Source Code

//package com.java2s;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

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

public class Main {

    public static BufferedReader readFileReturnBufferedReader(
            String filePath, String encoding) throws IOException {
        File file = new File(filePath);
        FileInputStream fileInputStream = null;
        try {/*from w w  w  . j av  a2s .c o m*/
            fileInputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw e;
        }
        return new BufferedReader(new InputStreamReader(fileInputStream,
                encoding));
    }
}

Related

  1. XMLFileToString(String xmlname, Context context)