Class ReadBufferCoalescing
java.lang.Object
io.micronaut.http.body.stream.ReadBufferCoalescing
Collects pieces of a body into a list. A body can arrive in very small pieces, e.g. one byte
per HTTP chunk, and every piece has a fixed overhead far beyond its size. Small pieces are
copied together, so the number of pieces kept is bounded by the number of bytes, not by the
number of pieces the client chose to send.
- Since:
- 5.2.21
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(List<ReadBuffer> pieces, ReadBuffer piece, ReadBufferFactory factory) Add a piece to the list, taking ownership of it.
-
Method Details
-
add
Add a piece to the list, taking ownership of it.- Parameters:
pieces- The pieces collected so far, owned by the callerpiece- The piece to addfactory- The factory for the copy of small pieces
-