title: FileNotFoundException reading file from android internal storage FileInputStream
body: <p><strong>Hello, I can't read the content of my file using FileInputStream. The code I use is the following:</strong></p>
  
  <pre><code>    List&lt;ContentValues&gt; poisList = new ArrayList&lt;ContentValues&gt;();
      try {
          FileInputStream fis = new FileInputStream (new File(filePath));
          BufferedReader br = new BufferedReader(new InputStreamReader(fis));
          String line = "";
  
          while ((line = br.readLine()) != null) {
              viewHolder.logout.setText(line);
              readPOI(poisList, line, categoryID);
          }
          br.close();
  
      } catch (FileNotFoundException e) {
          e.printStackTrace();
          Toast.makeText(getActivity(), "File", Toast.LENGTH_LONG).show();
      } catch (IOException e) {
          e.printStackTrace();
          Toast.makeText(getActivity(), "IO", Toast.LENGTH_LONG).show();
      }
  </code></pre>
  
  <p><strong>the value of the variable <em>filePath</em> is this: "/document/primary:Download/Taiwan.txt". I get it through using Intent.ACTION_GET_CONTENT and after using:</strong></p>
  
  <pre><code>@Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if(requestCode == 1){
          if(resultCode == Activity.RESULT_OK){
              filePath = data.getData().getPath();
  </code></pre>
  
  <p>I also used the following 2 options to get the file, but were not working too:</p>
  
  <pre><code>        FileInputStream fis = getActivity().openFileInput(filePath);
            InputStream is = getClass().getResourceAsStream(filePath);
  </code></pre>
  
  <p><strong>And the error is this:</strong></p>
  
  <pre><code>07-20 13:33:20.247    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ java.io.FileNotFoundException: /document/primary:Download/Taiwan.txt: open failed: ENOENT (No such file or directory)
  07-20 13:33:20.247    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at libcore.io.IoBridge.open(IoBridge.java:457)
  07-20 13:33:20.257    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:78)
  07-20 13:33:20.257    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at com.example.rafa.liquidgalaxypoiscontroller.AdminFragment.readFile(AdminFragment.java:74)
  07-20 13:33:20.267    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at com.example.rafa.liquidgalaxypoiscontroller.AdminFragment.onActivityResult(AdminFragment.java:176)
  07-20 13:33:20.267    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:163)
  07-20 13:33:20.277    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.Activity.dispatchActivityResult(Activity.java:5467)
  07-20 13:33:20.277    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.ActivityThread.deliverResults(ActivityThread.java:3383)
  07-20 13:33:20.287    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.ActivityThread.handleSendResult(ActivityThread.java:3430)
  07-20 13:33:20.287    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.ActivityThread.access$1300(ActivityThread.java:142)
  07-20 13:33:20.297    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251)
  07-20 13:33:20.297    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
  07-20 13:33:20.307    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
  07-20 13:33:20.307    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5118)
  07-20 13:33:20.317    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
  07-20 13:33:20.317    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
  07-20 13:33:20.317    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
  07-20 13:33:20.327    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
  07-20 13:33:20.327    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
  07-20 13:33:20.327    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
  07-20 13:33:20.337    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at libcore.io.Posix.open(Native Method)
  07-20 13:33:20.337    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
  07-20 13:33:20.337    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ at libcore.io.IoBridge.open(IoBridge.java:441)
  07-20 13:33:20.337    6089-6089/com.example.rafa.liquidgalaxypoiscontroller W/System.err﹕ ... 17 more
  </code></pre>
  
  <p>WHAT CAN I DO, PLEASE???
  THANK YOU</p>