code: public HttpConnection setRequestBody(final InputStream input, final long inputLength) {
          try {
              return setRequestBody(new InputStreamWrappingGenerator(input, inputLength),
                      inputLength);
          } catch (IOException e) {
              logger.log(Level.SEVERE, "Error copying input stream for request body", e);
              throw new RuntimeException(e);
          }
      }
docs: Set the InputStream of request body data, of known length, to be sent to the server.
  
  @param input       InputStream of request body data to be sent to the server
  @param inputLength Length of request body data to be sent to the server, in bytes
  @return an {@link HttpConnection} for method chaining
  @deprecated Use {@link #setRequestBody(InputStreamGenerator, long)}