title: getResponseBodyAsStream returns "Invalid byte 1 of 1-byte UTF-8 sequence"
body: <p>My code is</p>
  
  <pre><code>PostMethod method = new PostMethod(TRANSLATION_SERVICE);
  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  DocumentBuilder db = dbf.newDocumentBuilder();
  Document doc = db.parse(method.getResponseBodyAsStream());
  </code></pre>
  
  <p>It produces</p>
  
  <blockquote>
    <p>Invalid byte 1 of 1-byte UTF-8 sequence</p>
  </blockquote>
  
  <p>When I use <code>method.getResponseBodyAsString()</code>, I get the desired response, but <a href="http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpMethodBase.html#getResponseBodyAsString%28%29" rel="nofollow">the API</a> clearly states that</p>
  
  <blockquote>
    <p>Note: This will cause the entire response body to be buffered in memory. A malicious server may easily exhaust all the VM memory. It is strongly recommended, to use getResponseAsStream if the content length of the response is unknown or resonably large.</p>
  </blockquote>
  
  <p>Is there an alternative to the above approach?</p>