title: C++ IO vs Java IO
body: <p>Note that this is NOT a "better-than" discussion.</p>
  
  <p>I'm a Java programmer, and it makes me feel incredibly dumb not to know how to do very much C++ file IO.</p>
  
  <p>I need to make very simple adapter for XML parsers, just like code below says</p>
  
  <p>In Java, I could just use:</p>
  
  <pre><code>BufferedReader reader = new BufferedReader(
    new InputStreamReader(xmlInputStream));
  
  String xml = "";
  String line = null;
  while ((line = reader.readLine()) != null) {
    xml += line + "\n";
  }
  
  return xmlParser11.parse(xml);
  </code></pre>
  
  <p>Biggest question for me is what to do with this <code>reader</code> in C++</p>
  
  <p>Thanks very much!</p>
  
  <p>edit cutted ;)</p>