Java serialization for ByteString