MongoDB Reactive Streams Java驱动程序的 GridFSDownloadStream 类允许使用以下方法读取数据:
/**
* Reads a sequence of bytes from this stream into the given buffer.
*
* @param dst the destination buffer
* @return a publisher with a single element, the total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of the stream has been reached.
*/
Publisher<Integer> read(ByteBuffer dst);
是否有一种简单的方法来创建反应堆 Flux&lt; DataBuffer&gt; 基于此API?
我想用它来创建一个反应式REST响应。