AMQP.BasicProperties.getHeaders() returns a Map<String, Object> where the strings are of type LongStringHelper.ByteArrayLongString that is a private internal class which makes it impossible to write custom serializers for this class. Using Google Gson for instance, always inserts a "bytes": key before the value. While it is easy to write a serializer that converts the resulting byte[], I'd like to have the string value only without the "bytes": key.
In short, how can I produce a regular Java string out of LongStringHelper.ByteArrayLongString?