Here you can find the source of getUTF8Writer(String file)
public static Writer getUTF8Writer(String file) throws FileNotFoundException
//package com.java2s; //License from project: LGPL import java.io.*; import java.nio.charset.StandardCharsets; public class Main { public static Writer getUTF8Writer(String file) throws FileNotFoundException { return new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)); }/*from ww w .j a v a2 s . co m*/ }