Java tutorial
//package com.java2s; import java.io.FileOutputStream; public class Main { /** * @param fileName * @param message */ public static void writeFileSdcard(String fileName, String message) { try { FileOutputStream fout = new FileOutputStream(fileName); byte[] bytes = message.getBytes(); fout.write(bytes); fout.flush(); fout.close(); } catch (Exception e) { e.printStackTrace(); } } }