title: How to call readEntity on a Response twice?
body: <p>What I'm doing right now is resulting in a:</p>
  
  <pre><code>java.io.IOException: stream is closed
  </code></pre>
  
  <p>on the 2nd readEntity() since it closes the stream after the first read.</p>
  
  <p>Here is what I'm doing:</p>
  
  <pre><code>Response response = target.queryParam("start", startIndex)
     .queryParam("end", end)
     .request()
     .accept(MediaType.APPLICATION_XML)
     .header(authorizationHeaderName, authorizationHeaderValue)
     .get();
  
  String xml = response.readEntity(String.class);
  ourLogger.debug(xml);
  
  
  MyClass message = response.readEntity(MyClass.class); //throws IOException
  </code></pre>