Java UTF8 File Read getUtf8FileWriter(String file, boolean append)

Here you can find the source of getUtf8FileWriter(String file, boolean append)

Description

get Utf File Writer

License

Apache License

Declaration

public static Writer getUtf8FileWriter(String file, boolean append)
            throws FileNotFoundException, UnsupportedEncodingException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    public static Writer getUtf8FileWriter(String file, boolean append)
            throws FileNotFoundException, UnsupportedEncodingException {
        return new OutputStreamWriter(new FileOutputStream(file, append), "utf-8");
    }/* ww  w .jav a 2 s . c  o m*/

    public static Writer getUtf8FileWriter(File file, boolean append)
            throws FileNotFoundException, UnsupportedEncodingException {
        return new OutputStreamWriter(new FileOutputStream(file, append), "utf-8");
    }

    public static Writer getUtf8FileWriter(String file) throws FileNotFoundException, UnsupportedEncodingException {
        return new OutputStreamWriter(new FileOutputStream(file, false), "utf-8");
    }

    public static Writer getUtf8FileWriter(File file) throws FileNotFoundException, UnsupportedEncodingException {
        return new OutputStreamWriter(new FileOutputStream(file, false), "utf-8");
    }
}

Related

  1. getBufferedUTF8Reader(InputStream inputStream)
  2. getUtf8BytesFromFile(String fileName)
  3. getUTF8InputStreamReader(InputStream stream)
  4. getUTF8Reader(File f)
  5. loadUTF8(File file)
  6. makeUTF8Reader(InputStream inputStream)