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

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

本文整理了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

  1. /**
  2. * Returns the body corresponding to the language. If the language is null, the method result
  3. * will be the same as {@link #getBody()}. Null will be returned if the language does not have
  4. * a corresponding body.
  5. *
  6. * @param language the language of the body to return.
  7. * @return the body related to the passed in language.
  8. * @since 3.0.2
  9. */
  10. public String getBody(String language) {
  11. Body body = getMessageBody(language);
  12. return body == null ? null : body.message;
  13. }

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

  1. /**
  2. * Returns all the languages being used for the bodies, not including the default body.
  3. *
  4. * @return the languages being used for the bodies.
  5. * @since 3.0.2
  6. */
  7. public List<String> getBodyLanguages() {
  8. Body defaultBody = getMessageBody(null);
  9. List<String> languages = new ArrayList<String>();
  10. for (Body body : getBodies()) {
  11. if (!body.equals(defaultBody)) {
  12. languages.add(body.language);
  13. }
  14. }
  15. return Collections.unmodifiableList(languages);
  16. }

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

  1. /**
  2. * Returns the body corresponding to the language. If the language is null, the method result
  3. * will be the same as {@link #getBody()}. Null will be returned if the language does not have
  4. * a corresponding body.
  5. *
  6. * @param language the language of the body to return.
  7. * @return the body related to the passed in language.
  8. * @since 3.0.2
  9. */
  10. public String getBody(String language) {
  11. Body body = getMessageBody(language);
  12. return body == null ? null : body.message;
  13. }

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

  1. /**
  2. * Returns the body corresponding to the language. If the language is null, the method result
  3. * will be the same as {@link #getBody()}. Null will be returned if the language does not have
  4. * a corresponding body.
  5. *
  6. * @param language the language of the body to return.
  7. * @return the body related to the passed in language.
  8. * @since 3.0.2
  9. */
  10. public String getBody(String language) {
  11. Body body = getMessageBody(language);
  12. return body == null ? null : body.message;
  13. }

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

  1. /**
  2. * Returns the body corresponding to the language. If the language is null, the method result
  3. * will be the same as {@link #getBody()}. Null will be returned if the language does not have
  4. * a corresponding body.
  5. *
  6. * @param language the language of the body to return.
  7. * @return the body related to the passed in language.
  8. * @since 3.0.2
  9. */
  10. public String getBody(String language) {
  11. Body body = getMessageBody(language);
  12. return body == null ? null : body.message;
  13. }

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

  1. /**
  2. * Returns the body corresponding to the language. If the language is null, the method result
  3. * will be the same as {@link #getBody()}. Null will be returned if the language does not have
  4. * a corresponding body.
  5. *
  6. * @param language the language of the body to return.
  7. * @return the body related to the passed in language.
  8. * @since 3.0.2
  9. */
  10. public String getBody(String language) {
  11. Body body = getMessageBody(language);
  12. return body == null ? null : body.message;
  13. }

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

  1. /**
  2. * Returns all the languages being used for the bodies, not including the default body.
  3. *
  4. * @return the languages being used for the bodies.
  5. * @since 3.0.2
  6. */
  7. public Collection<String> getBodyLanguages() {
  8. Body defaultBody = getMessageBody(null);
  9. List<String> languages = new ArrayList<String>();
  10. for (Body body : bodies) {
  11. if (!body.equals(defaultBody)) {
  12. languages.add(body.language);
  13. }
  14. }
  15. return Collections.unmodifiableCollection(languages);
  16. }

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

  1. /**
  2. * Returns all the languages being used for the bodies, not including the default body.
  3. *
  4. * @return the languages being used for the bodies.
  5. * @since 3.0.2
  6. */
  7. public Collection<String> getBodyLanguages() {
  8. Body defaultBody = getMessageBody(null);
  9. List<String> languages = new ArrayList<String>();
  10. for (Body body : bodies) {
  11. if (!body.equals(defaultBody)) {
  12. languages.add(body.language);
  13. }
  14. }
  15. return Collections.unmodifiableCollection(languages);
  16. }

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

  1. /**
  2. * Returns all the languages being used for the bodies, not including the default body.
  3. *
  4. * @return the languages being used for the bodies.
  5. * @since 3.0.2
  6. */
  7. public Collection<String> getBodyLanguages() {
  8. Body defaultBody = getMessageBody(null);
  9. List<String> languages = new ArrayList<String>();
  10. for (Body body : bodies) {
  11. if (!body.equals(defaultBody)) {
  12. languages.add(body.language);
  13. }
  14. }
  15. return Collections.unmodifiableCollection(languages);
  16. }

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

  1. /**
  2. * Returns all the languages being used for the bodies, not including the default body.
  3. *
  4. * @return the languages being used for the bodies.
  5. * @since 3.0.2
  6. */
  7. public List<String> getBodyLanguages() {
  8. Body defaultBody = getMessageBody(null);
  9. List<String> languages = new ArrayList<String>();
  10. for (Body body : getBodies()) {
  11. if (!body.equals(defaultBody)) {
  12. languages.add(body.language);
  13. }
  14. }
  15. return Collections.unmodifiableList(languages);
  16. }

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

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

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

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

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

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

相关文章