Uses of Interface
org.springframework.core.io.buffer.DataBuffer
Packages that use DataBuffer
Package
Description
Generic abstraction for working with byte buffer implementations.
-
Uses of DataBuffer in org.springframework.core.codec
Subclasses with type arguments of type DataBuffer in org.springframework.core.codecModifier and TypeClassDescriptionclassSimple pass-through decoder forDataBuffers.classSimple pass-through encoder forDataBuffers.Methods in org.springframework.core.codec that return DataBufferModifier and TypeMethodDescriptionDataBufferDecoder.decode(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) ByteArrayEncoder.encodeValue(byte[] bytes, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) ByteBufferEncoder.encodeValue(ByteBuffer byteBuffer, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) CharSequenceEncoder.encodeValue(CharSequence charSequence, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) DataBufferEncoder.encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) default DataBufferEncoder.encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Encode an Object of type T to a data buffer.NettyByteBufEncoder.encodeValue(io.netty.buffer.ByteBuf byteBuf, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Methods in org.springframework.core.codec that return types with arguments of type DataBufferModifier and TypeMethodDescriptionreactor.core.publisher.Flux<DataBuffer> DataBufferDecoder.decode(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) final reactor.core.publisher.Flux<DataBuffer> AbstractSingleValueEncoder.encode(Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) protected abstract reactor.core.publisher.Flux<DataBuffer> AbstractSingleValueEncoder.encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) EncodeTto an outputDataBufferstream.reactor.core.publisher.Flux<DataBuffer> ByteArrayEncoder.encode(Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> ByteBufferEncoder.encode(Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> CharSequenceEncoder.encode(Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> DataBufferEncoder.encode(Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> Encoder.encode(Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Encode a stream of Objects of typeTinto aDataBufferoutput stream.reactor.core.publisher.Flux<DataBuffer> NettyByteBufEncoder.encode(Publisher<? extends io.netty.buffer.ByteBuf> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) protected reactor.core.publisher.Flux<DataBuffer> ResourceEncoder.encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> ResourceRegionEncoder.encode(Publisher<? extends ResourceRegion> input, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Methods in org.springframework.core.codec with parameters of type DataBufferModifier and TypeMethodDescriptionfinal TAbstractCharSequenceDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) byte[]ByteArrayDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) ByteBufferDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) DataBufferDecoder.decode(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decoder.decode(DataBuffer buffer, ResolvableType targetType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decode a data buffer to an Object of type T.io.netty.buffer.ByteBufNettyByteBufDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) ResourceDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) AbstractDataBufferDecoder.decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Deprecated.protected abstract TAbstractCharSequenceDecoder.decodeInternal(DataBuffer dataBuffer, Charset charset) Template method that decodes the given data buffer intoT, given the charset.protected CharBufferCharBufferDecoder.decodeInternal(DataBuffer dataBuffer, Charset charset) protected StringStringDecoder.decodeInternal(DataBuffer dataBuffer, Charset charset) DataBufferEncoder.encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) static voidHints.touchDataBuffer(DataBuffer buffer, @Nullable Map<String, Object> hints, org.apache.commons.logging.Log logger) If the hints contain aHints.LOG_PREFIX_HINTand the given logger has DEBUG level enabled, apply the log prefix as a hint to the given buffer viaDataBufferUtils.touch(DataBuffer, Object).Method parameters in org.springframework.core.codec with type arguments of type DataBufferModifier and TypeMethodDescriptionfinal reactor.core.publisher.Flux<T> AbstractCharSequenceDecoder.decode(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<T> AbstractDataBufferDecoder.decode(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<DataBuffer> DataBufferDecoder.decode(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Flux<T> Decoder.decode(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decode aDataBufferinput stream into a Flux ofT.reactor.core.publisher.Flux<Resource> ResourceDecoder.decode(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Mono<T> AbstractDataBufferDecoder.decodeToMono(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Mono<T> AbstractDecoder.decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) reactor.core.publisher.Mono<T> Decoder.decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decode aDataBufferinput stream into a Mono ofT.reactor.core.publisher.Flux<DataBuffer> DataBufferEncoder.encode(Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) -
Uses of DataBuffer in org.springframework.core.io.buffer
Subinterfaces of DataBuffer in org.springframework.core.io.bufferModifier and TypeInterfaceDescriptioninterfaceExtension ofDataBufferthat allows for buffers that can be used in atry-with-resources statement.interfaceExtension ofDataBufferthat allows for buffers that share a memory pool.interfaceExtension ofDataBufferthat allows for buffers that can be given hints for debugging purposes.Classes in org.springframework.core.io.buffer that implement DataBufferModifier and TypeClassDescriptionclassProvides a convenient implementation of theDataBufferinterface that can be overridden to adapt the delegate.classDefault implementation of theDataBufferinterface that uses aByteBufferinternally.final classImplementation of theDataBufferinterface that can wrap a JettyContent.Chunk.classImplementation of theDataBufferinterface that wraps a Netty 4ByteBuf.Subclasses with type arguments of type DataBuffer in org.springframework.core.io.bufferModifier and TypeClassDescriptionclassCustomListto collect data buffers with and enforce a limit on the total number of bytes buffered.Methods in org.springframework.core.io.buffer with type parameters of type DataBufferModifier and TypeMethodDescriptionstatic <T extends DataBuffer>
TDataBufferUtils.retain(T dataBuffer) Retain the given data buffer, if it is aPooledDataBuffer.static <T extends DataBuffer>
reactor.core.publisher.Flux<T> DataBufferUtils.skipUntilByteCount(Publisher<T> publisher, long maxByteCount) Skip buffers from the givenPublisheruntil the total byte count reaches the given maximum byte count, or until the publisher is complete.static <T extends DataBuffer>
InputStreamDataBufferUtils.subscriberInputStream(Publisher<T> publisher, int demand) Subscribe to givenPublisherofDataBuffers, and return anInputStreamto consume the byte content with.static <T extends DataBuffer>
reactor.core.publisher.Flux<T> DataBufferUtils.takeUntilByteCount(Publisher<T> publisher, long maxByteCount) Relay buffers from the givenPublisheruntil the total byte count reaches the given maximum byte count, or until the publisher is complete.static <T extends DataBuffer>
TAssociate the given hint with the data buffer if it is a pooled buffer and supports leak tracking.Methods in org.springframework.core.io.buffer that return DataBufferModifier and TypeMethodDescriptionDataBufferFactory.allocateBuffer()Deprecated.as of 6.0, in favor ofDataBufferFactory.allocateBuffer(int)DataBufferFactory.allocateBuffer(int initialCapacity) Allocate a data buffer of the given initial capacity.DataBuffer.capacity(int capacity) Deprecated.as of 6.0, in favor ofensureWritable(int), which has different semanticsDataBufferWrapper.capacity(int capacity) Deprecated.DefaultDataBuffer.capacity(int capacity) Deprecated.JettyDataBuffer.capacity(int capacity) Deprecated.DataBufferWrapper.dataBuffer()Return the wrapped delegate.default DataBufferDataBuffer.ensureCapacity(int capacity) Deprecated.since 6.0, in favor ofensureWritable(int)DataBufferWrapper.ensureCapacity(int capacity) Deprecated.DataBuffer.ensureWritable(int capacity) Ensure that the current buffer has enoughwritableByteCount()to write the amount of data given as an argument.DataBufferWrapper.ensureWritable(int capacity) DefaultDataBuffer.ensureWritable(int length) JettyDataBuffer.ensureWritable(int capacity) NettyDataBuffer.ensureWritable(int capacity) DataBufferFactory.join(List<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of thedataBufferselements joined together.NettyDataBufferFactory.join(List<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of thedataBufferselements joined together.DataBuffer.read(byte[] destination) Read this buffer's data into the specified destination, starting at the current reading position of this buffer.DataBuffer.read(byte[] destination, int offset, int length) Read at mostlengthbytes of this buffer into the specified destination, starting at the current reading position of this buffer.DataBufferWrapper.read(byte[] destination) DataBufferWrapper.read(byte[] destination, int offset, int length) JettyDataBuffer.read(byte[] destination) JettyDataBuffer.read(byte[] destination, int offset, int length) DataBuffer.readPosition(int readPosition) Set the position from which this buffer will read.DataBufferWrapper.readPosition(int readPosition) JettyDataBuffer.readPosition(int readPosition) LimitedDataBufferList.remove(int index) default DataBufferDataBuffer.retainedSlice(int index, int length) Deprecated.as of 6.0, in favor ofsplit(int), which has different semanticsDataBufferWrapper.retainedSlice(int index, int length) Deprecated.LimitedDataBufferList.set(int index, DataBuffer element) DataBuffer.slice(int index, int length) Deprecated.as of 6.0, in favor ofsplit(int), which has different semanticsDataBufferWrapper.slice(int index, int length) Deprecated.JettyDataBuffer.slice(int index, int length) Deprecated.DataBuffer.split(int index) Splits this data buffer into two at the given index.DataBufferWrapper.split(int index) JettyDataBuffer.split(int index) DataBufferFactory.wrap(byte[] bytes) Wrap the givenbytearray in aDataBuffer.DataBufferFactory.wrap(ByteBuffer byteBuffer) Wrap the givenByteBufferin aDataBuffer.NettyDataBufferFactory.wrap(byte[] bytes) DataBuffer.write(byte b) Write a single byte into this buffer at the current writing position.DataBuffer.write(byte[] source) Write the given source into this buffer, starting at the current writing position of this buffer.DataBuffer.write(byte[] source, int offset, int length) Write at mostlengthbytes of the given source into this buffer, starting at the current writing position of this buffer.default DataBufferDataBuffer.write(CharSequence charSequence, Charset charset) Write the givenCharSequenceusing the givenCharset, starting at the current writing position.DataBuffer.write(ByteBuffer... buffers) Write one or moreByteBufferto this buffer, starting at the current writing position.DataBuffer.write(DataBuffer... buffers) Write one or moreDataBuffers to this buffer, starting at the current writing position.DataBufferWrapper.write(byte b) DataBufferWrapper.write(byte[] source) DataBufferWrapper.write(byte[] source, int offset, int length) DataBufferWrapper.write(CharSequence charSequence, Charset charset) DataBufferWrapper.write(ByteBuffer... buffers) DataBufferWrapper.write(DataBuffer... buffers) JettyDataBuffer.write(byte b) JettyDataBuffer.write(byte[] source) JettyDataBuffer.write(byte[] source, int offset, int length) JettyDataBuffer.write(ByteBuffer... buffers) JettyDataBuffer.write(DataBuffer... buffers) NettyDataBuffer.write(CharSequence charSequence, Charset charset) DataBuffer.writePosition(int writePosition) Set the position to which this buffer will write.DataBufferWrapper.writePosition(int writePosition) JettyDataBuffer.writePosition(int writePosition) Methods in org.springframework.core.io.buffer that return types with arguments of type DataBufferModifier and TypeMethodDescriptionstatic reactor.core.publisher.Mono<DataBuffer> DataBufferUtils.join(Publisher<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of joining together the givendataBufferselements.static reactor.core.publisher.Mono<DataBuffer> DataBufferUtils.join(Publisher<? extends DataBuffer> buffers, int maxByteCount) Variant ofDataBufferUtils.join(Publisher)that behaves the same way up until the specified max number of bytes to buffer.static Publisher<DataBuffer> DataBufferUtils.outputStreamPublisher(Consumer<OutputStream> consumer, DataBufferFactory bufferFactory, Executor executor) Create a newPublisher<DataBuffer>based on bytes written to aOutputStream.static Publisher<DataBuffer> DataBufferUtils.outputStreamPublisher(Consumer<OutputStream> consumer, DataBufferFactory bufferFactory, Executor executor, int chunkSize) Variant ofDataBufferUtils.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 filePathinto aFluxofDataBuffers.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.read(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize) Read the givenResourceinto aFluxofDataBuffers starting at the given position.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.read(Resource resource, DataBufferFactory bufferFactory, int bufferSize) Read the givenResourceinto aFluxofDataBuffers.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, long position, DataBufferFactory bufferFactory, int bufferSize) Obtain anAsynchronousFileChannelfrom the given supplier, and read it into aFluxofDataBuffers, starting at the given position.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize) Obtain aAsynchronousFileChannelfrom the given supplier, and read it into aFluxofDataBuffers.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.readByteChannel(Callable<ReadableByteChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize) static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.readInputStream(Callable<InputStream> inputStreamSupplier, DataBufferFactory bufferFactory, int bufferSize) static Consumer<DataBuffer> DataBufferUtils.releaseConsumer()Return a consumer that callsDataBufferUtils.release(DataBuffer)on all passed data buffers.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<? extends DataBuffer> source, AsynchronousFileChannel channel, long position) Write the given stream ofDataBuffersto the givenAsynchronousFileChannel.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, OutputStream outputStream) Write the given stream ofDataBuffersto the givenOutputStream.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, AsynchronousFileChannel channel) Write the given stream ofDataBuffersto the givenAsynchronousFileChannel.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, WritableByteChannel channel) Write the given stream ofDataBuffersto the givenWritableByteChannel.Methods in org.springframework.core.io.buffer with parameters of type DataBufferModifier and TypeMethodDescriptionvoidLimitedDataBufferList.add(int index, DataBuffer buffer) booleanLimitedDataBufferList.add(DataBuffer buffer) intDataBufferUtils.Matcher.match(DataBuffer dataBuffer) Find the first matching delimiter and return the index of the last byte of the delimiter, or-1if not found.static booleanDataBufferUtils.release(@Nullable DataBuffer dataBuffer) Release the given data buffer.LimitedDataBufferList.set(int index, DataBuffer element) static io.netty.buffer.ByteBufNettyDataBufferFactory.toByteBuf(DataBuffer dataBuffer) Return the given NettyDataBufferas aByteBuf.DataBuffer.write(DataBuffer... buffers) Write one or moreDataBuffers to this buffer, starting at the current writing position.DataBufferWrapper.write(DataBuffer... buffers) DefaultDataBuffer.write(DataBuffer... dataBuffers) JettyDataBuffer.write(DataBuffer... buffers) NettyDataBuffer.write(DataBuffer... dataBuffers) Method parameters in org.springframework.core.io.buffer with type arguments of type DataBufferModifier and TypeMethodDescriptionbooleanLimitedDataBufferList.addAll(int index, Collection<? extends DataBuffer> collection) booleanLimitedDataBufferList.addAll(Collection<? extends DataBuffer> collection) DataBufferFactory.join(List<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of thedataBufferselements joined together.static reactor.core.publisher.Mono<DataBuffer> DataBufferUtils.join(Publisher<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of joining together the givendataBufferselements.static reactor.core.publisher.Mono<DataBuffer> DataBufferUtils.join(Publisher<? extends DataBuffer> buffers, int maxByteCount) Variant ofDataBufferUtils.join(Publisher)that behaves the same way up until the specified max number of bytes to buffer.DefaultDataBufferFactory.join(List<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of thedataBufferselements joined together.JettyDataBufferFactory.join(List<? extends DataBuffer> dataBuffers) NettyDataBufferFactory.join(List<? extends DataBuffer> dataBuffers) Return a newDataBuffercomposed of thedataBufferselements joined together.booleanLimitedDataBufferList.removeIf(Predicate<? super DataBuffer> filter) static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<? extends DataBuffer> source, AsynchronousFileChannel channel, long position) Write the given stream ofDataBuffersto the givenAsynchronousFileChannel.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, OutputStream outputStream) Write the given stream ofDataBuffersto the givenOutputStream.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, AsynchronousFileChannel channel) Write the given stream ofDataBuffersto the givenAsynchronousFileChannel.static reactor.core.publisher.Flux<DataBuffer> DataBufferUtils.write(Publisher<DataBuffer> source, WritableByteChannel channel) Write the given stream ofDataBuffersto the givenWritableByteChannel.static reactor.core.publisher.Mono<Void> DataBufferUtils.write(Publisher<DataBuffer> source, Path destination, OpenOption... options) Write the given stream ofDataBuffersto the given filePath.Constructors in org.springframework.core.io.buffer with parameters of type DataBufferModifierConstructorDescriptionDataBufferWrapper(DataBuffer delegate) Create a newDataBufferWrapperthat wraps the given buffer.
Decoder.decode(DataBuffer, ResolvableType, MimeType, Map)instead