I am trying to load an image from a URL i get from a Volley JSONObjectRequest.

This is my JSON request:

```
    //creates the post request and posts
    JsonObjectRequest getRandomImageURL = new JsonObjectRequest(Request.Method.POST, url_image,null,
            new Response.Listener<JSONObject>() {
                @Override
                public void onResponse(JSONObject response) {

                   Log.d("ServerResponse","ATM ImageURL"+response.toString());
                    try {
                        String image = response.getString("Image");
                        Log.d("Image","ImageURL "+imgLink+image);

                        imgAd = (ImageView) findViewById(R.id.imgAd);
                        String imgURL = imgLink+image;
                        new DownloadImageTask(imgAd).execute(imgURL);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                }

            },
            new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    // error
                    Log.d("Error.Response","Error"+ error.getLocalizedMessage());

                }
            }
    ) {
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            HashMap<String, String> headers = new HashMap<>();
            headers.put("Content-type", "application/json");
            headers.put("Accept", "application/json");
            headers.put("User-Agent", "Mozilla/5.0");
            headers.put("Content-length", dataStream.toString());
            return headers;
        }
        @Override
        public byte[] getBody() {
            try {
                return mRequestBody == null ? null : mRequestBody.getBytes("utf-8");
            } catch (UnsupportedEncodingException uee) {
                VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", mRequestBody, "utf-8");
                return null;
            }
        }
    };
    Volley.newRequestQueue(this).add(getRandomImageURL);
}

```

And this is what i use to load the image from the URL: 

```
private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
    ImageView bmImage;

    public DownloadImageTask(ImageView bmImage) {
        this.bmImage = bmImage;
    }

    protected Bitmap doInBackground(String... urls) {
        String urldisplay = urls[0];
        Bitmap mIcon11 = null;
        try {
            InputStream in = new java.net.URL(urldisplay).openStream();
            mIcon11 = BitmapFactory.decodeStream(in);
        } catch (Exception e) {
            Log.e("Error", e.getMessage());
            e.printStackTrace();
        }
        return mIcon11;
    }

    protected void onPostExecute(Bitmap result) {
        bmImage.setImageBitmap(result);
    }
}

```

I keep on getting the following exception:

```
W/System.err: java.io.FileNotFoundException:    https://www.lamdacardservices.com/offers/CINEMA Logo.jpg
W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
W/System.err:     at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
W/System.err:     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
W/System.err:     at java.net.URL.openStream(URL.java:470)
W/System.err:     at com.example.epavlos.lamda.map_activities.AtmMapActivity$DownloadImageTask$override.doInBackground(AtmMapActivity.java:327)
W/System.err:     at com.example.epavlos.lamda.map_activities.AtmMapActivity$DownloadImageTask$override.access$dispatch(AtmMapActivity.java)
W/System.err:     at com.example.epavlos.lamda.map_activities.AtmMapActivity$DownloadImageTask.doInBackground(AtmMapActivity.java:0)
W/System.err:     at com.example.epavlos.lamda.map_activities.AtmMapActivity$DownloadImageTask.doInBackground(AtmMapActivity.java:317)
W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:288)
W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err:     at java.lang.Thread.run(Thread.java:818)

```

Can anyone help me on what i am doing wrong? Or even if there is an easier way to achieve this, maybe using volley or something?