title: How to use printStream
body: <p>I have created a few methods to edit text from a file word by word but now need to use printStream to create a new file with the updated text. I have done some research on printStream but still don't quite understand how to do this. Here is my code: </p>
  
  <pre><code>public static void main(String[] args) throws FileNotFoundException {
      File jaws = new File("JawsScript.txt");
      Scanner in = new Scanner(jaws);
  
  
          while (in.hasNext()) {
      String word = in.next();
  
          PrintStream out =
      new PrintStream(new File("stuff.txt"));
  
      System.out.println(convert(word));
  
      } 
  </code></pre>
  
  <p>The method "convert" is a method that calls all of the other methods and applies all of the changes to a single string in the text:</p>
  
  <pre><code>//Applies all of the methods to the string
  public static String convert(String s) {
    String result = "";
      result = rYah(s);
      result = rWah(result);
      result = transform(result);
      result = apend(result);
      result = replace(result);
  
      return result;
  }
  </code></pre>
  
  <p>I basically am just wondering how I can use printStream to apply "convert" to the text and print the updated text to a new file.</p>