title: Java: How read a File line by line by ignoring "\n"
body: <p>I'm trying to read a tab separated text file line per line. The lines are separated by using carriage return ("\r\n") and LineFeed (\"n") is allowed within in tab separated text fields.</p>
  
  <p>Since I want to read the File Line per Line, I want my programm to ignore a standalone "\n". 
  Unfortunately, <code>BufferedReader</code> uses both possibilities to separate the lines. How can I modify my code, in order to ignore the standalone "\n"?</p>
  
  <pre><code>try 
  {
      BufferedReader in = new BufferedReader(new FileReader(flatFile));
      String line = null;
      while ((line = in.readLine()) != null) 
      {
          String cells[] = line.split("\t");                          
          System.out.println(cells.length);
          System.out.println(line);
      }
      in.close();
  } 
  catch (IOException e) 
  {
      e.printStackTrace();
  }
  </code></pre>