title: Saving image by url to internal storage
body: <p>Please, need help. I'm having this error java.io.FileNotFoundException: <a href="http://news.yandex.ru/quotes/1507.png" rel="nofollow">http://news.yandex.ru/quotes/1507.png</a> (can be seen by browser) while saving it to my internal storage.
   this is my method:</p>
  
  <p>void downloadGraph(String link){
                  try {</p>
  
  <pre><code>                URL url = new URL(link);
                  HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
                  urlConnection.setRequestMethod("GET");
                  urlConnection.setDoOutput(true);
                  urlConnection.connect();
  
                  File dbDirectory = new File(mctx.getFilesDir().getAbsolutePath()+ File.separator+"yqimages/");
                  if(!dbDirectory.exists())dbDirectory.mkdir();
                  String fname=link.substring(link.lastIndexOf("/")+1,link.length());
                  File file = new File(dbDirectory, fname);
                  FileOutputStream fileOutput = new FileOutputStream(file);
                  InputStream inputStream = urlConnection.getInputStream();
  
                  byte[] buffer = new byte[1024];
                  int bufferLength;
  
                  while ( (bufferLength = inputStream.read(buffer)) &gt; 0 ) {
                      fileOutput.write(buffer, 0, bufferLength);
                  }
                  fileOutput.close();
              } catch (final Exception e) {
                  e.printStackTrace();
              }
  }
  </code></pre>
  
  <p>Can you write a method to download\save this specific image (shown above)? Any help is appreciated!
  Get it!! the problem is not in the code, it's in the image <a href="https://news.yandex.ru/quotes/1507.png" rel="nofollow">https://news.yandex.ru/quotes/1507.png</a>. For some reason this picture can't be saved while the other ones do. Has it something to do with "httpS://"?</p>