code: public String messageAsText() {
          if (protocol.charset().isPresent()) {
              return message.decodeString(protocol.charset().get());
          } else {
              return Base64.getEncoder().encodeToString(message.toArray());
          }
      }
docs: Get the message as text.
  
  If this is a binary message (that is, the message protocol does not define a charset), encodes it using Base64.
  
  @return The message as text.