Here you can find the source of writeFileSdcard(File file, String message)
public static void writeFileSdcard(File file, String message) throws Exception
//package com.java2s; import java.io.File; import java.io.FileOutputStream; public class Main { public static void writeFileSdcard(File file, String message) throws Exception { FileOutputStream fout = new FileOutputStream(file); byte[] bytes = message.getBytes("UTF-8"); fout.write(bytes);/* w ww .j av a2s. c o m*/ fout.flush(); fout.close(); } }