org.springframework.core.codec

## 类 AbstractEncoder<T>

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

- 所有已实现的接口:
    Encoder<T>
  直接已知子类:
    AbstractSingleValueEncoder, ByteArrayEncoder, ByteBufferEncoder, CharSequenceEncoder, DataBufferEncoder, ResourceRegionEncoder

      public abstract class AbstractEncoder<T>
      extends Object
      implements Encoder<T>

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

- - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `canEncode(ResolvableType elementType, MimeType mimeType)` Whether the encoder supports the given source element type and the MIME type for the output stream.
    `List<MimeType>` | `getEncodableMimeTypes()` Return the list of mime types this encoder supports.

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

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

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

      `encode, getContentLength`

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

    - #### AbstractEncoder

          protected AbstractEncoder(MimeType... supportedMimeTypes)

  - ### 方法详细资料

    - #### getEncodableMimeTypes

          public List<MimeType> getEncodableMimeTypes()

      从接口复制的说明: `Encoder`
      Return the list of mime types this encoder supports.
      指定者:
        `getEncodableMimeTypes` 在接口中 `Encoder<T>`

    - #### canEncode

          public boolean canEncode(ResolvableType elementType,
                                   @Nullable
                                   MimeType mimeType)

      从接口复制的说明: `Encoder`
      Whether the encoder supports the given source element type and the MIME type for the output stream.
      指定者:
        `canEncode` 在接口中 `Encoder<T>`
      参数:
        `elementType` - the type of elements in the source stream
        `mimeType` - the MIME type for the output stream (can be `null` if not specified)
      返回:
        `true` if supported, `false` otherwise