title: how to use Input stream reader to load files from internal memory android
body: <p>my app requires that texts be saved(user choice) into the internal memory and then i want something like a favorite feature where user clicks on a button and a favorite activity starts to load the files saved in the memory(internal). in my program there are multiple texts and i have used a random generator to save the files as "fav1" "fav2" etc.. where the integer part is generated randomly. the problem is that now i don't know how to give my file name so that the files are retrieved and shown in a text View.</p>
  
  <pre><code>public void load(String name){
  
  
      try {
  </code></pre>
  
  <p><strong>BufferedReader inputReader = new BufferedReader(new InputStreamReader(openFileInput(filename)));</strong></p>
  
  <pre><code>        String inputString;
  
          StringBuffer stringBuffer = new StringBuffer();                
  
          while ((inputString = inputReader.readLine()) != null) {
  
              stringBuffer.append(inputString + "\n");
  
          }
  
          show.setText(stringBuffer.toString());
  
          } catch (IOException e) {
  
          e.printStackTrace();
  
          }
  </code></pre>
  
  <p>so how do you suggest i retrieve the files, its getting frustrating anyone help.</p>