org.springframework.core.serializer.support

## 类 SerializationDelegate

- java.lang.Object
- - org.springframework.core.serializer.support.SerializationDelegate

- 所有已实现的接口:
    Deserializer<Object>, Serializer<Object>

      public class SerializationDelegate
      extends Object
      implements Serializer<Object>, Deserializer<Object>

  A convenient delegate with pre-arranged configuration state for common serialization needs. Implements `Serializer` and `Deserializer` itself, so can also be passed into such more specific callback methods.
  从以下版本开始:
    4.3
  作者:
    Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `SerializationDelegate(ClassLoader classLoader)` Create a `SerializationDelegate` with a default serializer/deserializer for the given `ClassLoader`.
    `SerializationDelegate(Serializer<Object> serializer, Deserializer<Object> deserializer)` Create a `SerializationDelegate` with the given serializer/deserializer.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `deserialize(InputStream inputStream)` Read (assemble) an object of type T from the given InputStream.
    `void` | `serialize(Object object, OutputStream outputStream)` Write an object of type T to the given OutputStream.

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

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

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

    - #### SerializationDelegate

          public SerializationDelegate(ClassLoader classLoader)

      Create a `SerializationDelegate` with a default serializer/deserializer for the given `ClassLoader`.
      另请参阅:
        `DefaultDeserializer`, `DefaultDeserializer.DefaultDeserializer(ClassLoader)`

    - #### SerializationDelegate

          public SerializationDelegate(Serializer<Object> serializer,
                                       Deserializer<Object> deserializer)

      Create a `SerializationDelegate` with the given serializer/deserializer.
      参数:
        `serializer` - the `Serializer` to use (never `null)`
        `deserializer` - the `Deserializer` to use (never `null)`

  - ### 方法详细资料

    - #### serialize

          public void serialize(Object object,
                                OutputStream outputStream)
                         throws IOException

      从接口复制的说明: `Serializer`
      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.

      指定者:
        `serialize` 在接口中 `Serializer<Object>`
      参数:
        `object` - the object to serialize
        `outputStream` - the output stream
      抛出:
        `IOException` - in case of errors writing to the stream

    - #### deserialize

          public Object deserialize(InputStream inputStream)
                             throws IOException

      从接口复制的说明: `Deserializer`
      Read (assemble) an object of type T from the given InputStream.

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

      指定者:
        `deserialize` 在接口中 `Deserializer<Object>`
      参数:
        `inputStream` - the input stream
      返回:
        the deserialized object
      抛出:
        `IOException` - in case of errors reading from the stream