Class DefaultSerializer
- java.lang.Object
-
- com.networknt.session.jdbc.serializer.DefaultSerializer
-
- All Implemented Interfaces:
Serializer<Object>
public class DefaultSerializer extends Object implements Serializer<Object>
ASerializerimplementation that writes an object to an output stream using Java serialization.
-
-
Constructor Summary
Constructors Constructor Description DefaultSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidserialize(Object object, OutputStream outputStream)Writes the source object to an output stream using Java serialization.
-
-
-
Method Detail
-
serialize
public void serialize(Object object, OutputStream outputStream) throws IOException
Writes the source object to an output stream using Java serialization. The source object must implementSerializable.- Specified by:
serializein interfaceSerializer<Object>- Parameters:
object- the object to serializeoutputStream- the output stream- Throws:
IOException- in case of errors writing to the stream- See Also:
ObjectOutputStream.writeObject(Object)
-
-