spring-framework / org.springframework.core.io.buffer / DataBufferUtils / takeUntilByteCount

takeUntilByteCount

open static fun takeUntilByteCount(publisher: Publisher<DataBuffer>, maxByteCount: Long): Flux<DataBuffer>

Relay buffers from the given Publisher until the total byte count reaches the given maximum byte count, or until the publisher is complete.

Parameters

publisher - the publisher to filter

maxByteCount - the maximum byte count

Return
a flux whose maximum byte count is maxByteCount