Here you can find the source of getReader(File file)
Parameter | Description |
---|---|
file | a parameter |
public static BufferedReader getReader(File file)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; public class Main { /**/*from w w w . j av a 2s .c om*/ * Returns a reader object * @param file * @return */ public static BufferedReader getReader(File file) { BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); } catch (FileNotFoundException e) { e.printStackTrace(); throw new RuntimeException("Unable to get a reader!"); } return reader; } }