Here you can find the source of save(String data, String encoding, String file)
static public void save(String data, String encoding, String file) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; import java.io.IOException; public class Main { static public void save(String data, String encoding, String file) throws IOException { FileOutputStream os = new FileOutputStream(file); byte[] buf = data.getBytes(encoding); os.write(buf);/*from w w w .j a v a 2s . c om*/ os.close(); } }