code: public byte[] asByteArray() throws IOException {
  		if (reader != null) {
  			throw new IllegalStateException("Cannot get raw bytes from a Reader object.");
  		}
  
  		InputStream in = buildInputStream();
  		return consumeInputStream(in);
  	}
docs: Gets the stream contents as a byte array.
  @return the byte array
  @throws IOException if there was a problem reading from the stream
  @throws IllegalStateException if a {@link Reader} object was passed into
  this class's constructor