Here you can find the source of newReader(File pathname)
public static BufferedReader newReader(File pathname)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class Main { public static BufferedReader newReader(File pathname) { InputStream is = null;/* w w w . ja v a2 s . c o m*/ try { is = new FileInputStream(pathname); return new BufferedReader(new InputStreamReader(is, "UTF-8")); } catch (IOException e) { close(is); } return null; } public static void close(Closeable... closeables) { for (Closeable c : closeables) try { c.close(); } catch (IOException e) { /* ignore */ } } }