Here you can find the source of cachedJson(Context context, URI uri)
private static String cachedJson(Context context, URI uri)
//package com.java2s; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URI; import android.content.Context; import android.util.Log; public class Main { private static final String TAG = "SOHelper"; private static String cachedJson(Context context, URI uri) { try {/*from w ww . j a va2s.co m*/ StringBuffer json = new StringBuffer(); BufferedReader in = new BufferedReader(new InputStreamReader( context.openFileInput(String.format("%d.json", uri.hashCode())))); String line = null; while ((line = in.readLine()) != null) { json.append(line); } in.close(); return json.toString(); } catch (IOException ex) { Log.e(TAG, String.format("error reading cached %s", uri)); return null; } } }