接口 Serializer<T>
- 所有已知实现类:
DefaultSerializer
,SerializationDelegate
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 serializeoutputStream
- the output stream- 抛出:
IOException
- in case of errors writing to the stream