title: open Faild EISDIR (Is a Directory) .. how to fix this?
body: <p>Everytime it gives me "unable to decode stream java.io.FileNotFoundException: /: open Faild EISDIR (Is a Directory)</p>
  
  <p>how I can get rid of this error .. this class was working fine in many tasks I've done !!</p>
  
  <p>here's the class i'm using to get bitmaps </p>
  
  <pre><code>private class ImageLoaderTask extends AsyncTask&lt;HashMap&lt;String, Object&gt;, Void, HashMap&lt;String, Object&gt;&gt;{
  
      @Override
      protected HashMap&lt;String, Object&gt; doInBackground(HashMap&lt;String, Object&gt;... hm) {
  
          InputStream iStream=null;
          String imgUrl = (String) hm[0].get("image");
          int position = (Integer) hm[0].get("position");
  
          URL url;
          try {
              url = new URL(imgUrl);
  
              // Creating an http connection to communicate with url
              HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
  
              // Connecting to url
              urlConnection.connect();
  
              // Reading data from url
              iStream = urlConnection.getInputStream();
  
              // Getting Caching directory
              File cacheDirectory = getBaseContext().getCacheDir();
  
              // Temporary file to store the downloaded image
              File tmpFile = new File(cacheDirectory.getPath() + "/wpta_"+position+".png");
  
              // The FileOutputStream to the temporary file
              FileOutputStream fOutStream = new FileOutputStream(tmpFile);
  
              // Creating a bitmap from the downloaded inputstream
              Bitmap b = BitmapFactory.decodeStream(iStream);
  
              // Writing the bitmap to the temporary file as png file
              b.compress(Bitmap.CompressFormat.PNG,100, fOutStream);
  
              // Flush the FileOutputStream
              fOutStream.flush();
  
             //Close the FileOutputStream
             fOutStream.close();
  
              // Create a hashmap object to store image path and its position in the listview
              HashMap&lt;String, Object&gt; hmBitmap = new HashMap&lt;String, Object&gt;();
  
              // Storing the path to the temporary image file
              hmBitmap.put("photo",tmpFile.getPath());
              Log.d("photopah", tmpFile.getPath());
  
              // Storing the position of the image in the listview
              hmBitmap.put("position",position);
  
              // Returning the HashMap object containing the image path and position
              return hmBitmap;
  
          }catch (Exception e) {
              e.printStackTrace();
          }
          return null;
      }
  </code></pre>