类 DataBufferDecoder
java.lang.Object
cn.taketoday.core.codec.AbstractDecoder<T>
cn.taketoday.core.codec.AbstractDataBufferDecoder<DataBuffer>
cn.taketoday.core.codec.DataBufferDecoder
- 所有已实现的接口:
Decoder<DataBuffer>
Simple pass-through decoder for
DataBuffers.
Note: The data buffers should be released via
DataBufferUtils.release(DataBuffer)
after they have been consumed. In addition, if using Flux or
Mono operators such as flatMap, reduce, and others that prefetch,
cache, and skip or filter out data items internally, please add
doOnDiscard(DataBuffer.class, DataBufferUtils::release) to the
composition chain to ensure cached data buffers are released prior to an
error or cancellation signal.
- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Rossen Stoyanchev
-
字段概要
从类继承的字段 cn.taketoday.core.codec.AbstractDecoder
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleancanDecode(ResolvableType elementType, MimeType mimeType) Whether the decoder supports the given target element type and the MIME type of the source stream.decode(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Decode a data buffer to an Object of type T.reactor.core.publisher.Flux<DataBuffer>decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Decode aDataBufferinput stream into a Flux ofT.从类继承的方法 cn.taketoday.core.codec.AbstractDataBufferDecoder
decodeToMono, getMaxInMemorySize, setMaxInMemorySize从类继承的方法 cn.taketoday.core.codec.AbstractDecoder
getDecodableMimeTypes, getLogger, setLogger从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.core.codec.Decoder
getDecodableMimeTypes
-
构造器详细资料
-
DataBufferDecoder
public DataBufferDecoder()
-
-
方法详细资料
-
canDecode
从接口复制的说明:DecoderWhether the decoder supports the given target element type and the MIME type of the source stream.- 指定者:
canDecode在接口中Decoder<DataBuffer>- 覆盖:
canDecode在类中AbstractDecoder<DataBuffer>- 参数:
elementType- the target element type for the output streammimeType- the mime type associated with the stream to decode (can benullif not specified)- 返回:
trueif supported,falseotherwise
-
decode
public reactor.core.publisher.Flux<DataBuffer> decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) 从接口复制的说明:DecoderDecode aDataBufferinput stream into a Flux ofT.- 指定者:
decode在接口中Decoder<DataBuffer>- 覆盖:
decode在类中AbstractDataBufferDecoder<DataBuffer>- 参数:
input- theDataBufferinput stream to decodeelementType- the expected type of elements in the output stream; this type must have been previously passed to theDecoder.canDecode(cn.taketoday.core.ResolvableType, cn.taketoday.util.MimeType)method and it must have returnedtrue.mimeType- the MIME type associated with the input stream (optional)hints- additional information about how to do decode- 返回:
- the output stream with decoded elements
-
decode
public DataBuffer decode(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) 从接口复制的说明:DecoderDecode a data buffer to an Object of type T. This is useful for scenarios, that distinct messages (or events) are decoded and handled individually, in fully aggregated form.- 参数:
buffer- theDataBufferto decodeelementType- the expected output typemimeType- the MIME type associated with the datahints- additional information about how to do decode- 返回:
- the decoded value, possibly
null
-