public class ResourceDecoder extends AbstractDataBufferDecoder<Resource>
Resources.| 构造器和说明 |
|---|
ResourceDecoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
canDecode(ResolvableType elementType,
MimeType mimeType)
Whether the decoder supports the given target element type and the MIME
type of the source stream.
|
reactor.core.publisher.Flux<Resource> |
decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints)
Decode a
DataBuffer input stream into a Flux of T. |
protected Resource |
decodeDataBuffer(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints)
How to decode a
DataBuffer to the target element type. |
decodeToMonogetDecodableMimeTypespublic boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
Decoderpublic reactor.core.publisher.Flux<Resource> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
DecoderDataBuffer input stream into a Flux of T.decode 在接口中 Decoder<Resource>decode 在类中 AbstractDataBufferDecoder<Resource>inputStream - the DataBuffer input stream to decodeelementType - the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true.mimeType - the MIME type associated with the input stream (optional)hints - additional information about how to do encodeprotected Resource decodeDataBuffer(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
AbstractDataBufferDecoderDataBuffer to the target element type.