simple-disk-cache icon indicating copy to clipboard operation
simple-disk-cache copied to clipboard

how to put input stream in my class?

Open MikhilPastagia opened this issue 11 years ago • 0 comments

i am using json volley with simple disk cache class. but issue is that i am getting jsonArray as response, so how to put it as inputStream argument? my code is here, req = new JsonArrayRequest("URL", new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray data) {

                    for (int i = 0; i < data.length(); i++) {
                        try {
                            JSONObject jObj = data.getJSONObject(i);
                            Categories cat = new Categories();
                            cat.setId(jObj.getString("id"));
                                                    } catch (JSONException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    VolleyLog.d("Error", "Error: " + error.getMessage());
                    hideProgressDialog();
                }
            });

please help me...

MikhilPastagia avatar Nov 29 '14 11:11 MikhilPastagia