title: FileInputStream cannot be converted to Reader
body: <p>I am trying to read my text file "inputFile.txt" but system shows the error below.
  Can anyone help me to solve this error? Thank you!</p>
  
  <blockquote>
    <p>error: incompatible types: FileInputStream cannot be converted to Reader
                Yylex yy = new Yylex(fin);</p>
  </blockquote>
  
  <pre><code>    //create file object
      File infile = new
      File("C://name//test_jflex//inputFile.txt");
      int ch;
      StringBuffer strContent = new StringBuffer("");
      FileInputStream fin = null;
      try {
          fin = new FileInputStream(infile);
          Yylex yy = new Yylex(fin);
          Yytoken t;
          while ( (t = yy.yylex()) != null )
              System.out.println(t);
          fin.close();
      }
  </code></pre>