code: public void sendSync(Session session, BasicMessageWithExtraData<? extends BasicMessage> message)
              throws IOException {
          BinaryData binary = message.getBinaryData();
          if (binary == null) {
              sendBasicMessageSync(session, message.getBasicMessage());
          } else {
              // there is binary data to stream back - do it ourselves and don't return anything
              BinaryData serialized = ApiDeserializer.toHawkularFormat(message.getBasicMessage(),
                      message.getBinaryData());
              sendBinarySync(session, serialized);
          }
      }
docs: Delegates to either {@link #sendBasicMessageSync(Session, BasicMessage)} or
  {@link #sendBinarySync(Session, InputStream)} based on {@code message.getBinaryData() == null}.
  
  @param session the session to send to
  @param message the message to send
  @throws IOException