类 ResourceDecoder

所有已实现的接口:
Decoder<Resource>

public class ResourceDecoder extends AbstractDataBufferDecoder<Resource>
Decoder for Resources.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Rossen Stoyanchev
  • 字段详细资料

    • FILENAME_HINT

      public static String FILENAME_HINT
      Name of hint with a filename for the resource(e.g. from "Content-Disposition" HTTP header).
  • 构造器详细资料

    • ResourceDecoder

      public ResourceDecoder()
  • 方法详细资料

    • canDecode

      public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
      从接口复制的说明: Decoder
      Whether the decoder supports the given target element type and the MIME type of the source stream.
      指定者:
      canDecode 在接口中 Decoder<Resource>
      覆盖:
      canDecode 在类中 AbstractDecoder<Resource>
      参数:
      elementType - the target element type for the output stream
      mimeType - the mime type associated with the stream to decode (can be null if not specified)
      返回:
      true if supported, false otherwise
    • decode

      public reactor.core.publisher.Flux<Resource> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
      从接口复制的说明: Decoder
      Decode a DataBuffer input stream into a Flux of T.
      指定者:
      decode 在接口中 Decoder<Resource>
      覆盖:
      decode 在类中 AbstractDataBufferDecoder<Resource>
      参数:
      inputStream - the DataBuffer input stream to decode
      elementType - the expected type of elements in the output stream; this type must have been previously passed to the Decoder.canDecode(cn.taketoday.core.ResolvableType, cn.taketoday.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 decode
      返回:
      the output stream with decoded elements
    • decode

      public Resource decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
      从接口复制的说明: Decoder
      Decode 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 - the DataBuffer to decode
      elementType - the expected output type
      mimeType - the MIME type associated with the data
      hints - additional information about how to do decode
      返回:
      the decoded value, possibly null