@Override
        public int read(final byte[] b, final int off, final int len) throws IOException {
            propagateException();
            if (len == 0) {
                return 0;
            }
            final int bytesRead = this.buffer.read(b, off, len, timeout);
            if (bytesRead == -1) {
                fireComplete();
            }
            return bytesRead;
        }
TODO: to be replaced by core functionality
httpclient5/src/main/java/org/apache/hc/client5/http/impl/compat/ClassicToAsyncResponseConsumer.java