java.lang.Object
net.metanotion.io.data.IdentityBytes
- All Implemented Interfaces:
Serializer<byte[]>
Pass-through serializer for byte arrays.
Returns byte arrays unchanged during serialization/deserialization. Useful for storing raw binary data without modification.
Important: Performs direct reference copy, not deep copy. Modifications to returned array affect the original array.
Constructor Summary
ConstructorsMethod Summary
All Methods
Constructor Details
IdentityBytes
public IdentityBytes()Constructor. The pass-through holds no state: both methods hand back the very array they are given.
Method Details
getBytes
public byte[] getBytes(byte[] o) Return the bytes unchanged.- Specified by:
getBytesin interfaceSerializer<byte[]>- Parameters:
o- the object to serialize- Returns:
- byte[]
construct
public byte[] construct(byte[] b) Return the bytes unchanged.- Specified by:
constructin interfaceSerializer<byte[]>- Parameters:
b- the serialized bytes to read back- Returns:
- b