Skip to content

Commit e39bf87

Browse files
committed
Add reference docs for DataBufferUtils.compose
Issue: SPR-16365
1 parent 67e7c78 commit e39bf87

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/docs/asciidoc/core/core-databuffer-codec.adoc

+6-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,12 @@ It contains methods for reading a `Flux` of `DataBuffer` objects from an `InputS
145145
`DataBufferUtils` also exposes `retain` and `release` methods that operate on plain `DataBuffer`
146146
instances (so that casting to a `PooledDataBuffer` is not required).
147147

148-
149-
148+
Additionally, `DataBufferUtils` exposes `compose`, which merges a stream of data buffers into one.
149+
For instance, this method can be used to convert the entire HTTP body into a single buffer (and
150+
from that, a `String`, or `InputStream`).
151+
This is particularly useful when dealing with older, blocking APIs.
152+
Note, however, that this puts the entire body in memory, and therefore uses more memory than a pure
153+
streaming solution would.
150154

151155
[codecs]
152156
== Codecs

0 commit comments

Comments
 (0)