java read properties and xml file using stringbuilder
<p>I need to read a set of xml and property files and parse the data. Currently I am using inputstream ans string builder to do this. But this does not create the file in the same way as input file is. I donot want to remove the white spaces and new lines. How do i achieve this.</p>

<pre><code>is = test.getInputStream();
br = new BufferedReader(new InputStreamReader(is));
String line5;
StringBuilder sb5 = new StringBuilder();
while ((line5 = br.readLine()) != null) {
    sb5.append(line5);
} 
String s = sb5.toString();
</code></pre>

<p><strong>My output is:</strong></p>

<p><code>#test 123 #test2 345</code><br/></p>

<p><strong>Expected output is:</strong></p>

<pre><code>#test
123
#test2
345
</code></pre>

<p>Any thoughts ? Thanks</p>
