title: How read files txt into project folder android
body: <p>i try to create a project that can it to read txt files but show it the next error:</p>
  
  <blockquote>
    <p>/data/user/0/com.example.asojac.probandobuffer/files/hola.txt: open
    failed: ENOENT (No such file or directory)</p>
  </blockquote>
  
  <p>The file is in the "assets" folder</p>
  
  <p>My method is this:</p>
  
  <pre><code>public String getTexto() {
          try {
              File fileDir = new File(getFilesDir().getPath() +"/hola.txt");
              BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fileDir), "ISO-8859-1"));
              String str, str2="";
  
              while ((str = in.readLine()) != null) {
                  str2 += "\n" + str;
              }
              in.close();
              return str2;
  
          } catch (Exception e) {
              Log.e("TAG Exception" , e.getMessage());
          }
          return ":(";
      }
  </code></pre>
  
  <p>In the androidmanifest.xml</p>
  
  <pre><code>   &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
  </code></pre>
  
  <p>I also tried whit:</p>
  
  <pre><code>File fileDir = new File(getFilesDir() + "/hola.txt");
              BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fileDir), "ISO-8859-1"));
  </code></pre>