Interface Serializer
- All Known Implementing Classes:
FurySerializer
public interface Serializer
An interface for serializing and deserializing objects.
Implementations of this interface are responsible for managing the process of converting objects into a binary format and reconstructing objects from the binary format. This facilitates persistence, caching, or transferring objects across different systems.
-
Method Summary
-
Method Details
-
serialize
Serializes the given object into a binary format represented as a byte array. This allows objects to be persisted, cached, or transferred across systems.- Parameters:
object- the object to be serialized; must not be null- Returns:
- a byte array representing the serialized form of the object
- Throws:
IllegalStateException- if an error occurs during the serialization process
-
read
Deserializes the given binary data into an object. This method uses the provided byte array to reconstruct an object instance, typically reversing the process performed during serialization.- Parameters:
binary- the byte array representing the serialized object; must not be null- Returns:
- the deserialized object reconstructed from the binary data
- Throws:
IllegalStateException- if an error occurs during the deserialization process
-