public EntityBuilder setStream(final InputStream stream) {
        clearContent();
        this.stream = stream;
        return this;
    }
Sets entity content as an {@link InputStream}. This method is mutually exclusive with
{@link #setText(String)},
{@link #setBinary(byte[])},
{@link #setSerializable(java.io.Serializable)},
{@link #setParameters(java.util.List)},
{@link #setParameters(NameValuePair...)}
{@link #setFile(java.io.File)}.

@param stream The new entity content as an InputStream.
@return this instance.
httpclient5/src/main/java/org/apache/hc/client5/http/entity/EntityBuilder.java