org.jivesoftware.smack.packet.Message.getMessageBody()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.jivesoftware.smack.packet.Message.getMessageBody()方法的一些代码示例,展示了Message.getMessageBody()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getMessageBody()方法的具体详情如下:
包路径:org.jivesoftware.smack.packet.Message
类名称:Message
方法名:getMessageBody

Message.getMessageBody介绍

暂无

代码示例

代码示例来源:origin: igniterealtime/Smack

/**
 * Returns the body corresponding to the language. If the language is null, the method result
 * will be the same as {@link #getBody()}. Null will be returned if the language does not have
 * a corresponding body.
 *
 * @param language the language of the body to return.
 * @return the body related to the passed in language.
 * @since 3.0.2
 */
public String getBody(String language) {
  Body body = getMessageBody(language);
  return body == null ? null : body.message;
}

代码示例来源:origin: igniterealtime/Smack

/**
 * Returns all the languages being used for the bodies, not including the default body.
 *
 * @return the languages being used for the bodies.
 * @since 3.0.2
 */
public List<String> getBodyLanguages() {
  Body defaultBody = getMessageBody(null);
  List<String> languages = new ArrayList<String>();
  for (Body body : getBodies()) {
    if (!body.equals(defaultBody)) {
      languages.add(body.language);
    }
  }
  return Collections.unmodifiableList(languages);
}

代码示例来源:origin: tiandawu/IotXmpp

/**
 * Returns the body corresponding to the language. If the language is null, the method result
 * will be the same as {@link #getBody()}. Null will be returned if the language does not have
 * a corresponding body.
 *
 * @param language the language of the body to return.
 * @return the body related to the passed in language.
 * @since 3.0.2
 */
public String getBody(String language) {
  Body body = getMessageBody(language);
  return body == null ? null : body.message;
}

代码示例来源:origin: org.igniterealtime.smack/smack

/**
 * Returns the body corresponding to the language. If the language is null, the method result
 * will be the same as {@link #getBody()}. Null will be returned if the language does not have
 * a corresponding body.
 *
 * @param language the language of the body to return.
 * @return the body related to the passed in language.
 * @since 3.0.2
 */
public String getBody(String language) {
  Body body = getMessageBody(language);
  return body == null ? null : body.message;
}

代码示例来源:origin: org.igniterealtime.smack/smack-core

/**
 * Returns the body corresponding to the language. If the language is null, the method result
 * will be the same as {@link #getBody()}. Null will be returned if the language does not have
 * a corresponding body.
 *
 * @param language the language of the body to return.
 * @return the body related to the passed in language.
 * @since 3.0.2
 */
public String getBody(String language) {
  Body body = getMessageBody(language);
  return body == null ? null : body.message;
}

代码示例来源:origin: org.littleshoot/smack-xmpp-3-2-2

/**
 * Returns the body corresponding to the language. If the language is null, the method result
 * will be the same as {@link #getBody()}. Null will be returned if the language does not have
 * a corresponding body.
 *
 * @param language the language of the body to return.
 * @return the body related to the passed in language.
 * @since 3.0.2
 */
public String getBody(String language) {
  Body body = getMessageBody(language);
  return body == null ? null : body.message;
}

代码示例来源:origin: org.igniterealtime.smack/smack

/**
 * Returns all the languages being used for the bodies, not including the default body.
 *
 * @return the languages being used for the bodies.
 * @since 3.0.2
 */
public Collection<String> getBodyLanguages() {
  Body defaultBody = getMessageBody(null);
  List<String> languages = new ArrayList<String>();
  for (Body body : bodies) {
    if (!body.equals(defaultBody)) {
      languages.add(body.language);
    }
  }
  return Collections.unmodifiableCollection(languages);
}

代码示例来源:origin: tiandawu/IotXmpp

/**
 * Returns all the languages being used for the bodies, not including the default body.
 *
 * @return the languages being used for the bodies.
 * @since 3.0.2
 */
public Collection<String> getBodyLanguages() {
  Body defaultBody = getMessageBody(null);
  List<String> languages = new ArrayList<String>();
  for (Body body : bodies) {
    if (!body.equals(defaultBody)) {
      languages.add(body.language);
    }
  }
  return Collections.unmodifiableCollection(languages);
}

代码示例来源:origin: org.littleshoot/smack-xmpp-3-2-2

/**
 * Returns all the languages being used for the bodies, not including the default body.
 *
 * @return the languages being used for the bodies.
 * @since 3.0.2
 */
public Collection<String> getBodyLanguages() {
  Body defaultBody = getMessageBody(null);
  List<String> languages = new ArrayList<String>();
  for (Body body : bodies) {
    if (!body.equals(defaultBody)) {
      languages.add(body.language);
    }
  }
  return Collections.unmodifiableCollection(languages);
}

代码示例来源:origin: org.igniterealtime.smack/smack-core

/**
 * Returns all the languages being used for the bodies, not including the default body.
 *
 * @return the languages being used for the bodies.
 * @since 3.0.2
 */
public List<String> getBodyLanguages() {
  Body defaultBody = getMessageBody(null);
  List<String> languages = new ArrayList<String>();
  for (Body body : getBodies()) {
    if (!body.equals(defaultBody)) {
      languages.add(body.language);
    }
  }
  return Collections.unmodifiableList(languages);
}

代码示例来源:origin: org.littleshoot/smack-xmpp-3-2-2

Body defaultBody = getMessageBody(null);
if (defaultBody != null) {
  buf.append("<body>").append(StringUtils.escapeForXML(defaultBody.message)).append("</body>");

代码示例来源:origin: org.igniterealtime.smack/smack

Body defaultBody = getMessageBody(null);
if (defaultBody != null) {
  buf.append("<body>").append(StringUtils.escapeForXML(defaultBody.message)).append("</body>");

代码示例来源:origin: tiandawu/IotXmpp

Body defaultBody = getMessageBody(null);
if (defaultBody != null) {
  buf.append("<body>").append(StringUtils.escapeForXML(defaultBody.message)).append("</body>");

相关文章