Class SystemMessageSerializer
java.lang.Object
org.bsc.langgraph4j.langchain4j.serializer.std.SystemMessageSerializer
- All Implemented Interfaces:
Serializer<dev.langchain4j.data.message.SystemMessage>
public class SystemMessageSerializer
extends Object
implements Serializer<dev.langchain4j.data.message.SystemMessage>
The SystemMessageSerializer class implements the Serializer interface for the SystemMessage type.
It provides methods to serialize and deserialize SystemMessage objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.data.message.SystemMessageread(ObjectInput in) Deserializes a SystemMessage object from the specified ObjectInput stream.voidwrite(dev.langchain4j.data.message.SystemMessage object, ObjectOutput out) Serializes the given SystemMessage object to the specified ObjectOutput stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bsc.langgraph4j.serializer.Serializer
cloneObject, mimeType, readObject, writeObject
-
Constructor Details
-
SystemMessageSerializer
public SystemMessageSerializer()
-
-
Method Details
-
write
public void write(dev.langchain4j.data.message.SystemMessage object, ObjectOutput out) throws IOException Serializes the given SystemMessage object to the specified ObjectOutput stream.- Specified by:
writein interfaceSerializer<dev.langchain4j.data.message.SystemMessage>- Parameters:
object- the SystemMessage object to serializeout- the ObjectOutput stream to write the serialized object to- Throws:
IOException- if an I/O error occurs during serialization
-
read
public dev.langchain4j.data.message.SystemMessage read(ObjectInput in) throws IOException, ClassNotFoundException Deserializes a SystemMessage object from the specified ObjectInput stream.- Specified by:
readin interfaceSerializer<dev.langchain4j.data.message.SystemMessage>- Parameters:
in- the ObjectInput stream to read the serialized object from- Returns:
- the deserialized SystemMessage object
- Throws:
IOException- if an I/O error occurs during deserializationClassNotFoundException- if the class of a serialized object cannot be found
-