Code example for Gson

			File memory = Environment.getExternalStorageDirectory();
			File dir = new File(memory.getAbsolutePath() + DIRPATH);
			File file = new File(dir, Utils.FILENAMECONN);
			InputStream is = new BufferedInputStream(new FileInputStream(file));
			Gson gson = new Gson();
			final Reader reader = new InputStreamReader(is);
			return gson.fromJson(reader, Connections.class);
		} catch (Exception e) {
			return null; 
	public static InputStream DownloadJsonFromUrlAndCacheToSd(String url,
			String dirName, String fileName, Context context) {
		InputStream source = UtilsWeb.retrieveStream(url, context);
Connect your IDE to all the code out there  Get Codota for Java