Java tutorial
//package com.java2s; import java.io.File; import java.io.FileOutputStream; import android.util.Base64; public class Main { public static void saveEncodedFile(String encoded, File file) throws Exception { byte[] decodedAsBytes = Base64.decode(encoded, Base64.DEFAULT); FileOutputStream os = new FileOutputStream(file, true); os.write(decodedAsBytes); os.flush(); os.close(); } }