Java UTF8 File Read getUTF8Reader(File f)

Here you can find the source of getUTF8Reader(File f)

Description

get UTF Reader

License

Open Source License

Declaration

public static BufferedReader getUTF8Reader(File f) throws FileNotFoundException 

Method Source Code


//package com.java2s;
/*/*from  w  w  w  .  j a  va2 s.c  o m*/
This source code is copyrighted by Christophe Cerisara, CNRS, France.
    
It is licensed under the terms of the INRIA Cecill-C licence, as described in:
http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
 */

import java.io.*;

import java.nio.charset.Charset;

public class Main {
    public static BufferedReader getUTF8Reader(File f) throws FileNotFoundException {
        return new BufferedReader(
                new InputStreamReader(new FileInputStream(f), Charset.forName("UTF-8").newDecoder()));
    }
}

Related

  1. getBufferedUTF8Reader(InputStream inputStream)
  2. getUtf8BytesFromFile(String fileName)
  3. getUtf8FileWriter(String file, boolean append)
  4. getUTF8InputStreamReader(InputStream stream)
  5. loadUTF8(File file)
  6. makeUTF8Reader(InputStream inputStream)
  7. newUtf8Reader(final InputStream in)
  8. openFileReaderUTF8(File file)