Package | Description |
---|---|
org.springframework.core.codec | |
org.springframework.core.io.buffer |
Generic abstraction for working with byte buffer implementations.
|
Modifier and Type | Method and Description |
---|---|
protected DataBuffer |
DataBufferDecoder.decodeDataBuffer(DataBuffer buffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Flux<DataBuffer> |
DataBufferDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
ByteArrayEncoder.encode(org.reactivestreams.Publisher<? extends byte[]> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
ByteBufferEncoder.encode(org.reactivestreams.Publisher<? extends java.nio.ByteBuffer> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
CharSequenceEncoder.encode(org.reactivestreams.Publisher<? extends java.lang.CharSequence> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
DataBufferEncoder.encode(org.reactivestreams.Publisher<? extends DataBuffer> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
ResourceRegionEncoder.encode(org.reactivestreams.Publisher<? extends ResourceRegion> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<DataBuffer> |
Encoder.encode(org.reactivestreams.Publisher<? extends T> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Encode a stream of Objects of type
T into a DataBuffer
output stream. |
reactor.core.publisher.Flux<DataBuffer> |
AbstractSingleValueEncoder.encode(org.reactivestreams.Publisher<? extends T> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected reactor.core.publisher.Flux<DataBuffer> |
ResourceEncoder.encode(Resource resource,
DataBufferFactory dataBufferFactory,
ResolvableType type,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected abstract reactor.core.publisher.Flux<DataBuffer> |
AbstractSingleValueEncoder.encode(T t,
DataBufferFactory dataBufferFactory,
ResolvableType type,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Encode
T to an output DataBuffer stream. |
Modifier and Type | Method and Description |
---|---|
protected DataBuffer |
DataBufferDecoder.decodeDataBuffer(DataBuffer buffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected java.nio.ByteBuffer |
ByteBufferDecoder.decodeDataBuffer(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected java.lang.String |
StringDecoder.decodeDataBuffer(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected Resource |
ResourceDecoder.decodeDataBuffer(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
protected abstract T |
AbstractDataBufferDecoder.decodeDataBuffer(DataBuffer buffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
How to decode a
DataBuffer to the target element type. |
protected byte[] |
ByteArrayDecoder.decodeDataBuffer(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Flux<DataBuffer> |
DataBufferDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<java.lang.String> |
StringDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<Resource> |
ResourceDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<T> |
AbstractDataBufferDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Flux<T> |
Decoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Decode a
DataBuffer input stream into a Flux of T . |
reactor.core.publisher.Mono<T> |
AbstractDecoder.decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Mono<T> |
AbstractDataBufferDecoder.decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
reactor.core.publisher.Mono<T> |
Decoder.decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Decode a
DataBuffer input stream into a Mono of T . |
reactor.core.publisher.Flux<DataBuffer> |
DataBufferEncoder.encode(org.reactivestreams.Publisher<? extends DataBuffer> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints) |
Modifier and Type | Interface and Description |
---|---|
interface |
PooledDataBuffer
Extension of
DataBuffer that allows for buffer that share a memory
pool. |
Modifier and Type | Class and Description |
---|---|
class |
DefaultDataBuffer
Default implementation of the
DataBuffer interface that uses a
ByteBuffer internally. |
class |
NettyDataBuffer
Implementation of the
DataBuffer interface that wraps a Netty
ByteBuf . |
Modifier and Type | Method and Description |
---|---|
static <T extends DataBuffer> |
DataBufferUtils.retain(T dataBuffer)
Retain the given data buffer, it it is a
PooledDataBuffer . |
Modifier and Type | Method and Description |
---|---|
DataBuffer |
DataBufferFactory.allocateBuffer()
Allocate a data buffer of a default initial capacity.
|
DataBuffer |
DataBufferFactory.allocateBuffer(int initialCapacity)
Allocate a data buffer of the given initial capacity.
|
DataBuffer |
DataBuffer.capacity(int capacity)
Sets the number of bytes that this buffer can contain.
|
DataBuffer |
DataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
DefaultDataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
NettyDataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
DataBuffer.read(byte[] destination)
Read this buffer's data into the specified destination, starting at the current
reading position of this buffer.
|
DataBuffer |
DataBuffer.read(byte[] destination,
int offset,
int length)
Read at most
length bytes of this buffer into the specified destination,
starting at the current reading position of this buffer. |
DataBuffer |
DataBuffer.readPosition(int readPosition)
Set the position from which this buffer will read.
|
DataBuffer |
DataBuffer.slice(int index,
int length)
Create a new
DataBuffer whose contents is a shared subsequence of this
data buffer's content. |
DataBuffer |
DataBufferFactory.wrap(byte[] bytes)
Wrap the given
byte array in a DataBuffer . |
DataBuffer |
DefaultDataBufferFactory.wrap(byte[] bytes) |
DataBuffer |
NettyDataBufferFactory.wrap(byte[] bytes) |
DataBuffer |
DataBufferFactory.wrap(java.nio.ByteBuffer byteBuffer)
Wrap the given
ByteBuffer in a DataBuffer . |
DataBuffer |
DataBuffer.write(byte b)
Write a single byte into this buffer at the current writing position.
|
DataBuffer |
DataBuffer.write(byte[] source)
Write the given source into this buffer, startin at the current writing position
of this buffer.
|
DataBuffer |
DataBuffer.write(byte[] source,
int offset,
int length)
Write at most
length bytes of the given source into this buffer, starting
at the current writing position of this buffer. |
DataBuffer |
DataBuffer.write(java.nio.ByteBuffer... buffers)
Write one or more
ByteBuffer to this buffer, starting at the current
writing position. |
DataBuffer |
DataBuffer.write(DataBuffer... buffers)
Write one or more
DataBuffer s to this buffer, starting at the current
writing position. |
DataBuffer |
DataBuffer.writePosition(int writePosition)
Set the position to which this buffer will write.
|
Modifier and Type | Method and Description |
---|---|
static reactor.core.publisher.Mono<DataBuffer> |
DataBufferUtils.join(org.reactivestreams.Publisher<DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(java.nio.channels.AsynchronousFileChannel channel,
DataBufferFactory dataBufferFactory,
int bufferSize)
Deprecated.
as of Spring 5.0.3, in favor of
DataBufferUtils.readAsynchronousFileChannel(Callable, DataBufferFactory, int) , to be removed in
Spring 5.1 |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(java.nio.channels.AsynchronousFileChannel channel,
long position,
DataBufferFactory dataBufferFactory,
int bufferSize)
Deprecated.
as of Spring 5.0.3, in favor of
DataBufferUtils.readAsynchronousFileChannel(Callable, long, DataBufferFactory, int) , to be removed
in Spring 5.1 |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(java.io.InputStream inputStream,
DataBufferFactory dataBufferFactory,
int bufferSize)
Deprecated.
as of Spring 5.0.3, in favor of
DataBufferUtils.readInputStream(Callable, DataBufferFactory, int) , to be removed in Spring 5.1 |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(java.nio.channels.ReadableByteChannel channel,
DataBufferFactory dataBufferFactory,
int bufferSize)
Deprecated.
as of Spring 5.0.3, in favor of
DataBufferUtils.readByteChannel(Callable, DataBufferFactory, int) , to be removed in Spring 5.1 |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(Resource resource,
DataBufferFactory dataBufferFactory,
int bufferSize)
Read the given
Resource into a Flux of DataBuffer s. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(Resource resource,
long position,
DataBufferFactory dataBufferFactory,
int bufferSize)
Read the given
Resource into a Flux of DataBuffer s
starting at the given position. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.readAsynchronousFileChannel(java.util.concurrent.Callable<java.nio.channels.AsynchronousFileChannel> channelSupplier,
DataBufferFactory dataBufferFactory,
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.readAsynchronousFileChannel(java.util.concurrent.Callable<java.nio.channels.AsynchronousFileChannel> channelSupplier,
long position,
DataBufferFactory dataBufferFactory,
int bufferSize)
Obtain a
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.readByteChannel(java.util.concurrent.Callable<java.nio.channels.ReadableByteChannel> channelSupplier,
DataBufferFactory dataBufferFactory,
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(java.util.concurrent.Callable<java.io.InputStream> inputStreamSupplier,
DataBufferFactory dataBufferFactory,
int bufferSize)
Obtain a
InputStream from the given supplier, and read it into a Flux
of DataBuffer s. |
static java.util.function.Consumer<DataBuffer> |
DataBufferUtils.releaseConsumer()
Return a consumer that calls
DataBufferUtils.release(DataBuffer) on all
passed data buffers. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.skipUntilByteCount(org.reactivestreams.Publisher<DataBuffer> publisher,
long maxByteCount)
Skip buffers from the given
Publisher until the total
byte count reaches
the given maximum byte count, or until the publisher is complete. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.takeUntilByteCount(org.reactivestreams.Publisher<DataBuffer> publisher,
long maxByteCount)
Relay buffers from the given
Publisher until the total
byte count reaches
the given maximum byte count, or until the publisher is complete. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.nio.channels.AsynchronousFileChannel channel,
long position)
Write the given stream of
DataBuffer s to the given AsynchronousFileChannel . |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.io.OutputStream outputStream)
Write the given stream of
DataBuffer s to the given OutputStream . |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.nio.channels.WritableByteChannel channel)
Write the given stream of
DataBuffer s to the given WritableByteChannel . |
Modifier and Type | Method and Description |
---|---|
static boolean |
DataBufferUtils.release(DataBuffer dataBuffer)
Release the given data buffer, if it is a
PooledDataBuffer . |
static io.netty.buffer.ByteBuf |
NettyDataBufferFactory.toByteBuf(DataBuffer buffer)
Return the given Netty
DataBuffer as a ByteBuf . |
DataBuffer |
DataBuffer.write(DataBuffer... buffers)
Write one or more
DataBuffer s to this buffer, starting at the current
writing position. |
DefaultDataBuffer |
DefaultDataBuffer.write(DataBuffer... buffers) |
NettyDataBuffer |
NettyDataBuffer.write(DataBuffer... buffers) |
Modifier and Type | Method and Description |
---|---|
DataBuffer |
DataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
DefaultDataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
DataBuffer |
NettyDataBufferFactory.join(java.util.List<? extends DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
static reactor.core.publisher.Mono<DataBuffer> |
DataBufferUtils.join(org.reactivestreams.Publisher<DataBuffer> dataBuffers)
Return a new
DataBuffer composed of the dataBuffers elements joined together. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.skipUntilByteCount(org.reactivestreams.Publisher<DataBuffer> publisher,
long maxByteCount)
Skip buffers from the given
Publisher until the total
byte count reaches
the given maximum byte count, or until the publisher is complete. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.takeUntilByteCount(org.reactivestreams.Publisher<DataBuffer> publisher,
long maxByteCount)
Relay buffers from the given
Publisher until the total
byte count reaches
the given maximum byte count, or until the publisher is complete. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.nio.channels.AsynchronousFileChannel channel,
long position)
Write the given stream of
DataBuffer s to the given AsynchronousFileChannel . |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.io.OutputStream outputStream)
Write the given stream of
DataBuffer s to the given OutputStream . |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.write(org.reactivestreams.Publisher<DataBuffer> source,
java.nio.channels.WritableByteChannel channel)
Write the given stream of
DataBuffer s to the given WritableByteChannel . |