Trivial conversion
<p>How can I convert the value returned by  <code>System.getProperty("line.separator");</code> to its string representation. </p>

<p>For instance, if the value is <code>"\n"</code>  I would like to have the string formed by the characters:  <code>['\' + 'n']</code>, if the value is <code>"\r\n"</code> => <code>['\','r','\','n']</code>does it make sense?</p>

<p>Some very trivial ideas come to my mind, I would like to know different ones. </p>

<p><strong>edit</strong></p>

<p>Doh!!.. after a little thinking ( very little indeed ) I came up with the obvious:</p>

<pre><code>String  lineSeparatorRepresentation 
      = System.getProperty("line.separator").equals("\n")?"\\n":"\\r\\n";
</code></pre>
