Here you can find the source of getCharsetFileWriter(File file, String charset)
public static Writer getCharsetFileWriter(File file, String charset) throws IOException
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; public class Main { public static Writer getCharsetFileWriter(File file, String charset) throws IOException { return new OutputStreamWriter(new FileOutputStream(file), charset); }/*from w ww. j a v a 2 s . c o m*/ }