title: File not found Exception while copying Android File
body: <p>i am trying to use this code.</p>
  
  <pre><code>public synchronized void onActivityResult(final int requestCode, int resultCode,
          final Intent data) {
       String filePath = null;
       if (resultCode == Activity.RESULT_OK) {
           switch (requestCode) {
           case RESULT_MEMORY_SAVE:               
               filePath = data.getDataString();
               copyFileForReceipts(filePath,pathOfReceipts);
  </code></pre>
  
  <p>Now filePath is a String , Debugger shows its value as <code>"content://media/external/images/media/133"</code></p>
  
  <p>Next i am trying to use this:</p>
  
  <pre><code>sourceLocation  = filePath;
  File afile = new File(sourceLocation); 
  File bfile = new File(targetLocation + "file.jpg");
  inStream = new FileInputStream(afile.getName()); //Gives exception
  outStream = new FileOutputStream(bfile.getName());
  </code></pre>
  
  <p>Its gives an exception of <code>FileNotFound</code> exception. I have tried removing <code>.getName()</code> too.</p>
  
  <p>Please tell me where am i wrong.</p>
  
  <p>Regards</p>