org.springframework.core.serializer

## 接口 Serializer<T>

- 所有已知实现类:
    DefaultSerializer, SerializationDelegate
  函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

      @FunctionalInterface
      public interface Serializer<T>

  A strategy interface for streaming an object to an OutputStream.
  从以下版本开始:
    3.0.5
  作者:
    Gary Russell, Mark Fisher

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `serialize(T object, OutputStream outputStream)` Write an object of type T to the given OutputStream.

- - ### 方法详细资料

    - #### serialize

          void serialize(T object,
                         OutputStream outputStream)
                  throws IOException

      Write an object of type T to the given OutputStream.

      Note: Implementations should not close the given OutputStream (or any decorators of that OutputStream) but rather leave this up to the caller.

      参数:
        `object` - the object to serialize
        `outputStream` - the output stream
      抛出:
        `IOException` - in case of errors writing to the stream