code: public static byte[] streamBytes(InputStream stream) throws IOException {
  
  		ByteArrayOutputStream bytes = new ByteArrayOutputStream();
  
  		copyStream(stream, bytes);
  
  		return bytes.toByteArray();
  	}
docs: Get the stream bytes
  
  @param stream
  input stream
  @return stream bytes
  @throws IOException
  upon failure