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

@param binary The new entity content as a byte array.
@return this instance.
httpclient5/src/main/java/org/apache/hc/client5/http/entity/EntityBuilder.java