abstract class DataBufferUtils
Utility class for working with DataBuffers.
Author
Arjen Poutsma
Author
Brian Clozel
Since
5.0
DataBufferUtils()
Utility class for working with DataBuffers. |
open static fun read(inputStream: InputStream, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given open static fun read(channel: ReadableByteChannel, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given open static fun read(channel: AsynchronousFileChannel, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given open static fun read(channel: AsynchronousFileChannel, position: Long, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given open static fun read(resource: Resource, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given If the resource is a file, it is read into an open static fun read(resource: Resource, position: Long, dataBufferFactory: DataBufferFactory, bufferSize: Int): Flux<DataBuffer>
Read the given If the resource is a file, it is read into an |
|
open static fun release(dataBuffer: DataBuffer): Boolean
Release the given data buffer, if it is a PooledDataBuffer. |
|
open static fun releaseConsumer(): Consumer<DataBuffer>
Returns a consumer that calls |
|
open static fun <T : DataBuffer> retain(dataBuffer: T): T
Retain the given data buffer, it it is a PooledDataBuffer. |
|
open static fun skipUntilByteCount(publisher: Publisher<DataBuffer>, maxByteCount: Long): Flux<DataBuffer>
Skip buffers from the given Publisher until the total byte count reaches the given maximum byte count, or until the publisher is complete. |
|
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. |
|
open static fun write(source: Publisher<DataBuffer>, outputStream: OutputStream): Flux<DataBuffer>
Write the given stream of DataBuffers to the given Note that the writing process does not start until the returned open static fun write(source: Publisher<DataBuffer>, channel: WritableByteChannel): Flux<DataBuffer>
Write the given stream of DataBuffers to the given Note that the writing process does not start until the returned open static fun write(source: Publisher<DataBuffer>, channel: AsynchronousFileChannel, position: Long): Flux<DataBuffer>
Write the given stream of DataBuffers to the given Note that the writing process does not start until the returned |