code: public static byte[] streamToByteArray(final InputStream is) throws IOException {
  		ByteArrayOutputStream baos = new ByteArrayOutputStream();
  		copy(is, baos);
  		byte[] bytes = baos.toByteArray();
  		return bytes;
  	}
docs: This method returns the contents of a {@link InputStream} as a byte[].
  
  @param is The {@link InputStream} to be read into a byte[]
  @return A byte[] representing the contents of the given <em>is</em>.
  @throws IOException If there is an error reading from the <em>is</em>.