docs: static InputStream createInputStream(String method, String id, String params) throws IOException {
  		
  		StringBuilder envelope = new StringBuilder();
  		
  		envelope.append("{\"");
  		envelope.append(JSONRPC);
  		envelope.append("\":\"");
  		envelope.append(VERSION);
  		envelope.append("\",\"");
  		envelope.append(ID);
  		envelope.append("\":");
  		
  		// the 'id' value is assumed to be numerical.
  		
  		if (null != id && !id.isEmpty()) {
  			envelope.append(id);
  		} else {
  			envelope.append("null");
  		}
  		
  		envelope.append(",\"");
  		envelope.append(METHOD);
  		envelope.append("\":");
  		
  		if (null != method && !method.isEmpty()) {
  			envelope.append('"');
  			envelope.append(method);
  			envelope.append('"');
  		} else {
  			envelope.append("null");
  		}
  		envelope.append(",\"");
  		envelope.append(PARAMS);
  		envelope.append("\":");
  		
  		if (null != params && !params.isEmpty()) {
  			String decodedParams;
  			
  			// some specifications suggest that the GET "params" query parameter should be Base64 encoded and
  			// some suggest not.  Try to deal with both scenarios -- the code here was previously only doing
  			// Base64 decoding.
  			// http://www.simple-is-better.org/json-rpc/transport_http.html
  			// http://www.jsonrpc.org/historical/json-rpc-over-http.html#encoded-parameters
  			
  			if (BASE64_PATTERN.matcher(params).matches()) {
  				decodedParams = new String(Base64.decode(params), StandardCharsets.UTF_8);
  			} else {
  				switch (params.charAt(0)) {
  					case '[':
  					case '{':
  						decodedParams = params;
  						break;
  					
  					default:
  						throw new IOException("badly formed 'param' parameter starting with; [" + params.charAt(0) + "]");
  				}
  			}
  			
  			envelope.append(decodedParams);
  		} else {
  			envelope.append("[]");
  		}
  		
  		envelope.append('}');
  		
  		return new ByteArrayInputStream(envelope.toString().getBytes(StandardCharsets.UTF_8));
  	}