Here you can find the source of getBufferedReader(File file)
Parameter | Description |
---|---|
file | a parameter |
Parameter | Description |
---|---|
FileNotFoundException | an exception |
public static BufferedReader getBufferedReader(File file) throws FileNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; public class Main { /**/*from w ww. jav a2s . c o m*/ * Creates a buffered reader for a specified file. * @param file * @return A BufferedReader for the specified File. * @throws FileNotFoundException */ public static BufferedReader getBufferedReader(File file) throws FileNotFoundException { FileInputStream fis = new FileInputStream(file); InputStreamReader isr = new InputStreamReader(fis); return new BufferedReader(isr); } }