Java tutorial
//package com.java2s; import java.io.FileWriter; import android.content.Context; public class Main { public static void writeJsonOnDisk(Context context, String fileName, StringBuilder bigStr) { try { FileWriter Filewriter = new FileWriter(context.getApplicationInfo().dataDir + "/" + fileName + ".json"); Filewriter.write(bigStr.toString()); Filewriter.close(); } catch (Exception e) { e.printStackTrace(); } } }