类 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
-
构造器概要
构造器构造器说明SerializationDelegate(Serializer<Object> serializer, Deserializer<Object> deserializer) Create aSerializationDelegatewith the given serializer/deserializer.SerializationDelegate(ClassLoader classLoader) Create aSerializationDelegatewith a default serializer/deserializer for the givenClassLoader. -
方法概要
修饰符和类型方法说明deserialize(InputStream inputStream) Read (assemble) an object of type T from the given InputStream.voidserialize(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从接口继承的方法 cn.taketoday.core.serializer.Deserializer
deserializeFromByteArray从接口继承的方法 cn.taketoday.core.serializer.Serializer
serializeToByteArray
-
构造器详细资料
-
SerializationDelegate
Create aSerializationDelegatewith a default serializer/deserializer for the givenClassLoader. -
SerializationDelegate
Create aSerializationDelegatewith the given serializer/deserializer.- 参数:
serializer- theSerializerto use (nevernull)deserializer- theDeserializerto use (nevernull)
-
-
方法详细资料
-
serialize
从接口复制的说明:SerializerWrite 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 serializeoutputStream- the output stream- 抛出:
IOException- in case of errors writing to the stream
-
deserialize
从接口复制的说明:DeserializerRead (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
-