code: public void send(String data) throws UnsupportedEncodingException {
          log.trace("send message: {}", data);
          // process the incoming string
          if (StringUtils.isNotBlank(data)) {
              send(Packet.build(data.getBytes("UTF8"), MessageType.TEXT));
          } else {
              throw new UnsupportedEncodingException("Cannot send a null string");
          }
      }
docs: Sends text to the client.
  
  @param data
  string data
  @throws UnsupportedEncodingException