类 ResourceDecoder
Decoder for
Resources.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Rossen Stoyanchev
-
字段概要
字段修饰符和类型字段说明static StringName of hint with a filename for the resource(e.g. from "Content-Disposition" HTTP header).从类继承的字段 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 dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Decode a data buffer to an Object of type T.reactor.core.publisher.Flux<Resource>decode(org.reactivestreams.Publisher<DataBuffer> inputStream, 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
-
字段详细资料
-
FILENAME_HINT
Name of hint with a filename for the resource(e.g. from "Content-Disposition" HTTP header).
-
-
构造器详细资料
-
ResourceDecoder
public ResourceDecoder()
-
-
方法详细资料
-
canDecode
从接口复制的说明:DecoderWhether the decoder supports the given target element type and the MIME type of the source stream. -
decode
public reactor.core.publisher.Flux<Resource> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) 从接口复制的说明:DecoderDecode aDataBufferinput stream into a Flux ofT.- 指定者:
decode在接口中Decoder<Resource>- 覆盖:
decode在类中AbstractDataBufferDecoder<Resource>- 参数:
inputStream- 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 Resource decode(DataBuffer dataBuffer, 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.- 参数:
dataBuffer- 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
-