title: Change from using a BufferedReader for a file, to a String
body: <p>I have a working app that would take a text file, modify it in stages until it was neat and usable.
  every stage would take in a file and modify it, then spit out a file that the next one would buffer in.</p>
  
  <p>i am trying to make it cleaner so i want stop pulling in files, except the first one, and pass the output down the app as a string.
  Using this code, how would i do that?</p>
  
  <p>this is the second stage.</p>
  
  <pre><code>try {
                  BufferedReader bufferedReader = new BufferedReader(new FileReader(new File("C:/Stage_Two.txt")));
                  StringBuffer stringBuffer = new StringBuffer();
                  String line;
                  while ((line = bufferedReader.readLine()) != null) {
                      Pattern pattern = Pattern.compile("ALL|MESSAGE|Time|PAPER_MAIN|GSP");
                      if (pattern.matcher(line).find()) {
                          continue;
                      }
                      stringBuffer.append(line);
                      stringBuffer.append("\n");
                  }
                  BufferedWriter bwr = new BufferedWriter(new FileWriter(new File("C:/Stage_Three.txt")));
                  bwr.write(stringBuffer.toString());
                  bwr.flush();
                  bwr.close();
                  // to see in console
                  //System.out.println(stringBuffer);
              } catch (IOException e) {
              }
  </code></pre>
  
  <p>i have looked into InputStream, InputStreamReader, and Reader...but if its one of those i cant seem to make headway.</p>