code: public String getStreamAsString(String encoding) throws IOException {
  		String result = null;
  		try {
  			result = IOUtils.toString(getStream(), encoding);
  		}
  		catch (NullPointerException npex) {
  			throw new IOException("Timeout has been forced by CommonHttpClient", npex);
  		}
  		return result;
  	}
docs: Converts the inputstream to a string with the given encoding. Subsequent the inputstream will be empty/closed.