title: Java - Fastest Way to Reading Text Files Char by Char
body: <p>I have nearly 500 text files with 10 million words. I have to index those words. What is the fastest way to read from a text file character by character? Here is my initial attempt:</p>
  
  <pre><code>InputStream ist = new FileInputStream(this.path+"/"+doc);
  BufferedReader in = new BufferedReader(new InputStreamReader(ist));
  
  String line;
  
  while((line = in.readLine()) != null){
  
  
     line = line.toUpperCase(Locale.ENGLISH);
      String word = "";
  
      for (int j = 0; j &lt;= line.length(); j++) {
           char  c= line.charAt(j);
       // OPERATIONS
  
  }
  </code></pre>