public interface SerializationSupport
Serializer
to affect the initial stage of serialization
and the final stage of deserialization.
The semantics of this interface's methods are identical to the
writeReplace
and readResolve
pseudo-interface methods
defined by the Serializable
interface.
This interface provides trivial implementations of both methods to allow implementors to override only the necessary one.
Modifier and Type | Method and Description |
---|---|
default Object |
readResolve()
Designate a replacement for an object after an instance of it is read from
the buffer.
|
default Object |
writeReplace()
Designate an alternative object to be used when writing an object to the
buffer.
|
default Object writeReplace() throws ObjectStreamException
This method is invoked by the Serializer
if the object implements
SerializationSupport
interface.
ObjectStreamException
default Object readResolve() throws ObjectStreamException
This method is invoked by the Serializer
if the object implements
SerializationSupport
interface.
ObjectStreamException