From e39bf87b07a84247a8edc7a8e50451743fe7ff45 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Fri, 12 Jan 2018 11:38:50 +0100 Subject: [PATCH] Add reference docs for DataBufferUtils.compose Issue: SPR-16365 --- src/docs/asciidoc/core/core-databuffer-codec.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/docs/asciidoc/core/core-databuffer-codec.adoc b/src/docs/asciidoc/core/core-databuffer-codec.adoc index 8caa524d0bd..5117ce074b4 100644 --- a/src/docs/asciidoc/core/core-databuffer-codec.adoc +++ b/src/docs/asciidoc/core/core-databuffer-codec.adoc @@ -145,8 +145,12 @@ It contains methods for reading a `Flux` of `DataBuffer` objects from an `InputS `DataBufferUtils` also exposes `retain` and `release` methods that operate on plain `DataBuffer` instances (so that casting to a `PooledDataBuffer` is not required). - - +Additionally, `DataBufferUtils` exposes `compose`, which merges a stream of data buffers into one. +For instance, this method can be used to convert the entire HTTP body into a single buffer (and +from that, a `String`, or `InputStream`). +This is particularly useful when dealing with older, blocking APIs. +Note, however, that this puts the entire body in memory, and therefore uses more memory than a pure +streaming solution would. [codecs] == Codecs