# Uses of Interface
org.springframework.core.io.buffer.DataBufferFactory

Packages that use DataBufferFactory
Package
Description
org.springframework.core.codec
`Encoder` and `Decoder` abstractions to convert between a reactive stream of bytes and Java objects.
org.springframework.core.io.buffer
Generic abstraction for working with byte buffer implementations.

## Uses of DataBufferFactory in org.springframework.core.codec

Methods in org.springframework.core.codec with parameters of type DataBufferFactory
Modifier and Type
Method
Description
`final reactor.core.publisher.Flux<DataBuffer>`
AbstractSingleValueEncoder.`encode(Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`protected abstract reactor.core.publisher.Flux<DataBuffer>`
AbstractSingleValueEncoder.`encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)`
Encode `T` to an output `DataBuffer` stream.
`reactor.core.publisher.Flux<DataBuffer>`
ByteArrayEncoder.`encode(Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
ByteBufferEncoder.`encode(Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
CharSequenceEncoder.`encode(Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
DataBufferEncoder.`encode(Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
Encoder.`encode(Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Encode a stream of Objects of type `T` into a `DataBuffer` output stream.
`reactor.core.publisher.Flux<DataBuffer>`
Netty5BufferEncoder.`encode(Publisher<? extends io.netty5.buffer.Buffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Deprecated, for removal: This API element is subject to removal in a future version.
`reactor.core.publisher.Flux<DataBuffer>`
NettyByteBufEncoder.`encode(Publisher<? extends io.netty.buffer.ByteBuf> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`protected reactor.core.publisher.Flux<DataBuffer>`
ResourceEncoder.`encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
ResourceRegionEncoder.`encode(Publisher<? extends ResourceRegion> input, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
ByteArrayEncoder.`encodeValue(byte[] bytes, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
ByteBufferEncoder.`encodeValue(ByteBuffer byteBuffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
CharSequenceEncoder.`encodeValue(CharSequence charSequence, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
DataBufferEncoder.`encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`default DataBuffer`
Encoder.`encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
Encode an Object of type T to a data buffer.
`DataBuffer`
Netty5BufferEncoder.`encodeValue(io.netty5.buffer.Buffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
Deprecated, for removal: This API element is subject to removal in a future version.
`DataBuffer`
NettyByteBufEncoder.`encodeValue(io.netty.buffer.ByteBuf byteBuf, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`

## Uses of DataBufferFactory in org.springframework.core.io.buffer

Classes in org.springframework.core.io.buffer that implement DataBufferFactory
Modifier and Type
Class
Description
`class`
`DefaultDataBufferFactory`
Default implementation of the `DataBufferFactory` interface.
`class`
`JettyDataBufferFactory`
Implementation of the `DataBufferFactory` interface that creates `JettyDataBuffer` instances.
`class`
`Netty5DataBufferFactory`
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.2.18 with no replacement
`class`
`NettyDataBufferFactory`
Implementation of the `DataBufferFactory` interface based on a Netty 4 `ByteBufAllocator`.
Methods in org.springframework.core.io.buffer that return DataBufferFactory
Modifier and Type
Method
Description
`DataBufferFactory`
DataBuffer.`factory()`
Return the `DataBufferFactory` that created this buffer.
`DataBufferFactory`
DataBufferWrapper.`factory()`
`DataBufferFactory`
JettyDataBuffer.`factory()`
`DataBufferFactory`
Netty5DataBuffer.`factory()`
Deprecated, for removal: This API element is subject to removal in a future version.
Methods in org.springframework.core.io.buffer with parameters of type DataBufferFactory
Modifier and Type
Method
Description
`static Publisher<DataBuffer>`
DataBufferUtils.`outputStreamPublisher(Consumer<OutputStream> consumer, DataBufferFactory bufferFactory, Executor executor)`
Create a new `Publisher<DataBuffer>` based on bytes written to a `OutputStream`.
`static Publisher<DataBuffer>`
DataBufferUtils.`outputStreamPublisher(Consumer<OutputStream> consumer, DataBufferFactory bufferFactory, Executor executor, int chunkSize)`
Variant of `DataBufferUtils.outputStreamPublisher(Consumer, DataBufferFactory, Executor)` providing control over the chunk sizes to be produced by the publisher.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`read(Path path, DataBufferFactory bufferFactory, int bufferSize, OpenOption... options)`
Read bytes from the given file `Path` into a `Flux` of `DataBuffer`s.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`read(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize)`
Read the given `Resource` into a `Flux` of `DataBuffer`s starting at the given position.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`read(Resource resource, DataBufferFactory bufferFactory, int bufferSize)`
Read the given `Resource` into a `Flux` of `DataBuffer`s.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, long position, DataBufferFactory bufferFactory, int bufferSize)`
Obtain an `AsynchronousFileChannel` from the given supplier, and read it into a `Flux` of `DataBuffer`s, starting at the given position.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize)`
Obtain a `AsynchronousFileChannel` from the given supplier, and read it into a `Flux` of `DataBuffer`s.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`readByteChannel(Callable<ReadableByteChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize)`
Obtain a `ReadableByteChannel` from the given supplier, and read it into a `Flux` of `DataBuffer`s.
`static reactor.core.publisher.Flux<DataBuffer>`
DataBufferUtils.`readInputStream(Callable<InputStream> inputStreamSupplier, DataBufferFactory bufferFactory, int bufferSize)`
Obtain an `InputStream` from the given supplier, and read it into a `Flux` of `DataBuffer`s.