title: How to get EOL character of any file in java
body: <p>I am trying to find the <code>EOL</code> character of a file. I have tried the following snippet:</p>
  
  <pre><code>java.io.FileInputStream inputStream = null;  
  inputStream=new java.io.FileInputStream (inputFile.trim());
  java.util.Properties p = new java.util.Properties(System.getProperties());  
  p.load(inputStream);  
  System.setProperties(p);  
  String lineSeperator=System.getProperties().getProperty("line.separator");  
  System.out.println("--"+lineSeperator);
  </code></pre>
  
  <p>The result i am getting here is always <code>\r\n</code>, Even if i am reading a Linux originated file where delimiter should be <code>\n</code>.</p>
  
  <p>What am i doing wrong ?</p>