code: public static RequestBody createRequestBody(final MediaType contentType, final InputStream stream)
      {
          return new RequestBody()
          {
              @Override
              public MediaType contentType()
              {
                  return contentType;
              }
  
              @Override
              public void writeTo(BufferedSink sink) throws IOException
              {
                  try (Source source = Okio.source(stream))
                  {
                      sink.writeAll(source);
                  }
              }
          };
      }
docs: Creates a new request body that transmits the provided {@link java.io.InputStream InputStream}.
  
  @param  contentType
  The {@link okhttp3.MediaType MediaType} of the data
  @param  stream
  The {@link java.io.InputStream InputStream} to be transmitted
  
  @return RequestBody capable of transmitting the provided InputStream of data