code: public byte[] getStreamAsBytearray() throws IOException {
  		byte[] result = null;
  		try {
  			result = IOUtils.toByteArray(getStream());
  		}
  		catch (NullPointerException npex) {
  			throw new IOException("Timeout has been forced by CommonHttpClient", npex);
  		}
  		return result;
  	}
docs: Converts the inputstream to a string in UTF-8. Subsequent the inputstream will be empty/closed.