I doubt that duplicate will help here either looks like the same problem will manifest itself in a different way, seems like a catch-22 with the bytebuffers :( , wouldn't be averse to leaving the onus on the callers of the serializers of ensuring the bytebuffers are positioned correctly before and after the call to serializers