Package one.nio.serial
Class SerializedWrapper<T>
java.lang.Object
one.nio.serial.SerializedWrapper<T>
- All Implemented Interfaces:
Serializable
A wrapper for a preserialized object. Helps to avoid double serialization.
The wrapper automatically unpacks the original object during deserialization.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]inthashCode()unwrap()static <T> SerializedWrapper<T>wrap(T object)
-
Constructor Details
-
SerializedWrapper
public SerializedWrapper(byte[] serialized)
-
-
Method Details
-
getSerialized
public byte[] getSerialized() -
hashCode
public int hashCode() -
equals
-
wrap
- Throws:
IOException
-
unwrap
- Throws:
IOExceptionClassNotFoundException
-