Custom Serializers - Unexpected preamble in read ByteBuffer?

19 views
Skip to first unread message

Chris C.

unread,
Aug 2, 2024, 3:15:56 PM8/2/24
to ehcache-users
I have a custom Serializer implementation that returns a ByteBuffer of 51 bytes during the serialize method; however, I notice when the ByteBuffer is passed into the read method on the Serializer when its fetched, I get 91 bytes, where I need to effectively skip the first 40 bytes of the buffer to read the data I had originally serialized.

Perhaps I have missed a detail in the documentation, but everything I have read thus far seems to indicate that if I return 51 bytes from serialize to EhCache that the read method will also provide me a buffer with 51 bytes.  

Why is there a difference? 
Reply all
Reply to author
Forward
0 new messages