Here you can find the source of open(File file, Charset charset)
public static BufferedReader open(File file, Charset charset) throws FileNotFoundException
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; public class Main { public static BufferedReader open(File file, Charset charset) throws FileNotFoundException { InputStream in = new FileInputStream(file); return new BufferedReader(new InputStreamReader(in, charset)); }//from ww w.ja v a2 s . c o m public static BufferedReader open(String filePath, Charset charset) throws FileNotFoundException { return open(new File(filePath), charset); } }