Here you can find the source of getReader(String path, String charEncoding)
public static BufferedReader getReader(String path, String charEncoding) throws FileNotFoundException, UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static BufferedReader getReader(String path, String charEncoding) throws FileNotFoundException, UnsupportedEncodingException { return getReader(new File(path), charEncoding); }/*from w w w .j a v a 2 s . c om*/ public static BufferedReader getReader(File file, String charEncoding) throws FileNotFoundException, UnsupportedEncodingException { // TODO Auto-generated method stub InputStream is = new FileInputStream(file); return new BufferedReader(new InputStreamReader(is, charEncoding)); } public static BufferedReader getReader(InputStream inputStream, String charEncoding) throws UnsupportedEncodingException { return new BufferedReader(new InputStreamReader(inputStream, charEncoding)); } }