@Override
                        protected void data(final CharBuffer data, final boolean endOfStream) {
                            while (data.hasRemaining()) {
                                System.out.print(data.get());
                            }
                            if (endOfStream) {
                                System.out.println();
                            }
                        }
Example of asynchronous HTTP/1.1 request execution with response streaming.
httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java