Java File to Reader openReader(String dir, String filename, String encoding)

Here you can find the source of openReader(String dir, String filename, String encoding)

Description

open Reader

License

Open Source License

Declaration

public static BufferedReader openReader(String dir, String filename, String encoding) throws IOException 

Method Source Code


//package com.java2s;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import java.io.InputStreamReader;

public class Main {
    public static BufferedReader openReader(String dir, String filename, String encoding) throws IOException {
        File file = new File(dir + filename);
        return new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding), 4 * 1024);
    }//from  www . ja va  2s  .  co  m
}

Related

  1. newReader(File file, String encoding)
  2. newReader(File pathname)
  3. newReader(String value)
  4. openReader(File file)
  5. openReader(final String file, String charset)
  6. openReader(String file)
  7. openReader(String filePath)
  8. openReader(String fname)