title: Java Scanner newline recognition
body: <p>I can't find the documentation that specifies how a Scanner treats newline patterns by default. I want to read a file line by line and have the scanner be able to handle \r, \n or \r\n line endings regardless of the system the program is actually running on.</p>
  
  <p>If I declare a scanner like so:</p>
  
  <pre><code>Scanner scanner = new Scanner(reader);
  </code></pre>
  
  <p>what is the default behaviour? Will it handle all three kinds as described above or do I have to tell it explicitly to do it?</p>