Here you can find the source of cacheJson(Context context, URI uri, String jsonSource)
private static void cacheJson(Context context, URI uri, String jsonSource)
//package com.java2s; import java.io.IOException; import java.io.PrintWriter; import java.net.URI; import android.content.Context; import android.util.Log; public class Main { private static final String TAG = "SOHelper"; private static void cacheJson(Context context, URI uri, String jsonSource) {/*from w ww . jav a 2 s.c o m*/ try { PrintWriter out = new PrintWriter(context.openFileOutput( String.format("%d.json", uri.hashCode()), Context.MODE_PRIVATE)); out.write(jsonSource); out.close(); } catch (IOException ex) { Log.e(TAG, String.format("error caching %s", uri)); } } }