Here you can find the source of writeFile(String fileName, byte[] content)
public static void writeFile(String fileName, byte[] content)
//package com.java2s; import java.io.FileOutputStream; public class Main { public static void writeFile(String fileName, byte[] content) { try {/*from www . ja v a 2s . c om*/ FileOutputStream fos = new FileOutputStream(fileName); fos.write(content); fos.flush(); fos.close(); } catch (Exception e) { } } public static void writeFile(String fileName, String content) { writeFile(fileName, content.getBytes()); } }