public ByteArrayBuilder charset(final Charset charset) {
        if (charset == null) {
            this.charsetEncoder = null;
        } else {
            this.charsetEncoder = charset.newEncoder()
                    .onMalformedInput(CodingErrorAction.IGNORE)
                    .onUnmappableCharacter(CodingErrorAction.REPLACE);
        }
        return this;
    }
Builder class for sequences of bytes.

@since 5.0
ngrinder-runtime/src/main/java/org/apache/hc/client5/http/utils/ByteArrayBuilder.java