Java Text File Read by Charset newUTF8CharSetReader(String filename)

Here you can find the source of newUTF8CharSetReader(String filename)

Description

new UTF Char Set Reader

License

Open Source License

Declaration

public static BufferedReader newUTF8CharSetReader(String filename)
            throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

import java.nio.charset.Charset;

public class Main {
    public static BufferedReader newUTF8CharSetReader(String filename)
            throws IOException {
        return new BufferedReader(new InputStreamReader(
                new FileInputStream(filename), Charset.forName("UTF-8")));
    }/*  w ww .  j av a2s . c om*/
}

Related

  1. newBufferedFileReader(File file, Charset charset)
  2. newBufferedReader(URL url, Charset cs)
  3. newReader(File file, Charset charset)
  4. newReader(InputStream input, Charset encoding)
  5. newReader(ReadableByteChannel ch, Charset cs)
  6. openNewCompressedInputReader(final InputStream inputStream, final Charset charset)
  7. read(File file, Charset charset)
  8. read(InputStream _is, CharsetDecoder _decoder)
  9. read(InputStream in, Charset charset)