Carriage return and new line with Java and readLine()
<p>I am using the following code to establish a HTTP connection and read data:</p>

<pre><code>con = (HttpURLConnection) new URL("http://stream.twitter.com/1/statuses/sample.json").openConnection();
...
con.connect();
while (line = rd.readLine()) {
    if (line.contains("\r\n")) {
      System.out.println("Carriage return + new line");
    }
} 
</code></pre>

<p>However, it seems like "\r\n" is not part of the string (<code>line</code>), although the server does return them. How can I read the data and detect "\r\n"?</p>

<p>Thanks,</p>

<p>Joel</p>
