title: The role of FileReader and BufferedReader - why wrapp FileReader?
body: <p>I cannot really grasp what the purpose is for the <code>FileReader</code> and <code>BufferedReader</code> classes in Java. </p>
  
  <p>At docs.oracle one is recommended to wrap a buffered reader around a <code>FileReader</code> object because it's not efficient to use the <code>FileReader</code> directly. Where does the cost or overhead come from?</p>
  
  <p>Let say I have a text file that I want to read into my java program using these classes:</p>
  
  <p>I use FileReader and BufferedReader</p>
  
  <pre><code>FileReader fileReader = new FileReader(new File("text.txt)"); // probably correct???
  BufferedReader bufferedReader = new BufferedReader(fileReader);
  </code></pre>
  
  <p>1) What is the task of the <code>FileReader</code> object here? Is it responsible to make an I/O-request via the OS to the file, and thereafter read bytes? What is the cost with this?
  Is it true that the <code>FileReader</code> makes several I/O-requests? Or is the cost when the <code>FileReader</code> object has to converting bytes to characters, character by character?</p>
  
  <p>2) The task of the BufferedReader-object - to refer to the last sentence above. - Is the role for the BufferedReader-object to simply buffer arrays of incoming bytes and THEN convert those to character?</p>
  
  <p>Very grateful for answers</p>
  
  <p>Edit: first of all thanks for incoming answers. But I should have mentioned that its exactly this documentation I have studied. Call me stupid or something - but what is meant by "each read request". WHEN is <strong>each</strong> read request made? how often?</p>
  
  <p><em>In general, <strong>each</strong> read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,</em></p>
  
  <p>This is mostly why a launched this question - It sounds that the FileReader causes a lot of I/O-request which slows erverthing down.</p>