@Override
        public void write(final byte[] b) throws IOException {
            propagateException();
            if (b == null) {
                return;
            }
            this.buffer.write(b, 0, b.length, timeout);
        }
TODO: to be replaced by core functionality
httpclient5/src/main/java/org/apache/hc/client5/http/impl/compat/ClassicToAsyncRequestProducer.java