org.springframework.core.codec

## 类 AbstractDecoder<T>

- java.lang.Object
- - org.springframework.core.codec.AbstractDecoder<T>

- 所有已实现的接口:
    Decoder<T>
  直接已知子类:
    AbstractDataBufferDecoder

      public abstract class AbstractDecoder<T>
      extends Object
      implements Decoder<T>

  Abstract base class for `Decoder` implementations.
  从以下版本开始:
    5.0
  作者:
    Sebastien Deleuze, Arjen Poutsma

- - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `AbstractDecoder(MimeType... supportedMimeTypes)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `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.Mono<T>` | `decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)` Decode a `DataBuffer` input stream into a Mono of `T`.
    `List<MimeType>` | `getDecodableMimeTypes()` Return the list of MIME types this decoder supports.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### 从接口继承的方法 org.springframework.core.codec.Decoder

      `decode`

- - ### 构造器详细资料

    - #### AbstractDecoder

          protected AbstractDecoder(MimeType... supportedMimeTypes)

  - ### 方法详细资料

    - #### getDecodableMimeTypes

          public List<MimeType> getDecodableMimeTypes()

      从接口复制的说明: `Decoder`
      Return the list of MIME types this decoder supports.
      指定者:
        `getDecodableMimeTypes` 在接口中 `Decoder<T>`

    - #### 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<T>`
      参数:
        `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

    - #### decodeToMono

          public reactor.core.publisher.Mono<T> decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
                                                             ResolvableType elementType,
                                                             @Nullable
                                                             MimeType mimeType,
                                                             @Nullable
                                                             Map<String,Object> hints)

      从接口复制的说明: `Decoder`
      Decode a `DataBuffer` input stream into a Mono of `T`.
      指定者:
        `decodeToMono` 在接口中 `Decoder<T>`
      参数:
        `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(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 encode
      返回:
        the output stream with the decoded element