类 SerializationDelegate

java.lang.Object
cn.taketoday.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.0
作者:
Juergen Hoeller
  • 构造器详细资料

  • 方法详细资料

    • 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