public interface Serializer<T>
void serialize(T object, java.io.OutputStream outputStream) throws java.io.IOException
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 streamjava.io.IOException
- in case of errors writing to the stream