Here you can find the source of getFileReader(String fileName)
Parameter | Description |
---|---|
fileName | a parameter |
public static FileReader getFileReader(String fileName)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; public class Main { /**/* w w w . j a v a 2 s . c o m*/ * Getting a file reader of {@code fileName} * @param fileName * @return */ public static FileReader getFileReader(String fileName) { return getFileReader(new File(fileName)); } /** * Getting a file reader of {@code file} * @param fileName * @return */ public static FileReader getFileReader(File file) { try { return new FileReader(file); } catch (FileNotFoundException e) { throw new IllegalArgumentException(e); } } }