Get the message content as a string.
@param message The message.
@return The message content.
503489
public String getContentString(Message message)
    {
        try {
            String strContentType = message.getContentType();
            Object content = message.getContent();
            if (content instanceof MimeMultipart)
            {
                for (int index = 0; ; index++)
                {
                    BodyPart bodyPart = ((javax.mail.internet.MimeMultipart)content).getBodyPart(index);
                    Object contents = bodyPart.getContent();
                    if (contents != null)
                        return contents.toString();
                }
            }
            return message.getContent().toString();     // pend(don) FIX THIS!
        } catch (IOException ex)    {
            ex.printStackTrace();
        } catch (MessagingException ex)    {
            ex.printStackTrace();
        }
        return null;
    }
45379
protected String getDetailedErrorMessage(String message) {
		StringBuilder sb = new StringBuilder(message).append("\n");
		sb.append("HandlerMethod details: \n");
		sb.append("Bean [").append(getBeanType().getName()).append("]\n");
		sb.append("Method [").append(getBridgedMethod().toGenericString()).append("]\n");
		return sb.toString();
	}
233754
public static void message(String message) {
           getMessageCenter().notify(new Message(message, Message.Severity.Info));
       }
683872
public String getMessage() {
    StringBuffer result = new StringBuffer();
    Iterator<IOException> itr = problems.iterator();
    while(itr.hasNext()) {
      result.append(itr.next().getMessage());
      if (itr.hasNext()) {
        result.append("\n");
      }
    }
    return result.toString();
  }
368633
private function getMessage(string $message): string
    {
        $hasTranslation = $this->messages !== null && array_key_exists($message, $this->messages) === false;

        return $hasTranslation === true ? $this->messages[$message] : $message;
    }
1049125
private void getContent(Query query, Message message, int row) throws MessagingException, IOException {
	StringBuffer body = new StringBuffer();
	Struct cids = new StructImpl();
	query.setAtEL(CIDS, row, cids);
	if (message.isMimeType("text/plain")) {
	    String content = getConent(message);
	    query.setAtEL(TEXT_BODY, row, content);
	    body.append(content);
	}
	else if (message.isMimeType("text/html")) {
	    String content = getConent(message);
	    query.setAtEL(HTML_BODY, row, content);
	    body.append(content);
	}
	else {
	    Object content = message.getContent();
	    if (content instanceof MimeMultipart) {
		Array attachments = new ArrayImpl();
		Array attachmentFiles = new ArrayImpl();
		getMultiPart(query, row, attachments, attachmentFiles, cids, (MimeMultipart) content, body);

		if (attachments.size() > 0) {
		    try {
			query.setAtEL(ATTACHMENTS, row, ListUtil.arrayToList(attachments, "\t"));
		    }
		    catch (PageException pageexception) {}
		}
		if (attachmentFiles.size() > 0) {
		    try {
			query.setAtEL(ATTACHMENT_FILES, row, ListUtil.arrayToList(attachmentFiles, "\t"));
		    }
		    catch (PageException pageexception1) {}
		}

	    }
	}
	query.setAtEL(BODY, row, body.toString());
    }
1062343
public Object getContent() throws IOException, UnsupportedEncodingException {
		ContentTypeHeader contentTypeHeader = (ContentTypeHeader)
 			this.message.getHeader(ContentTypeHeader.NAME);
		if(contentTypeHeader != null && logger.isDebugEnabled()) {
			logger.debug("Content type " + contentTypeHeader.getContentType());
			logger.debug("Content sub type " + contentTypeHeader.getContentSubType());
		}
		if(contentTypeHeader!= null && CONTENT_TYPE_TEXT.equals(contentTypeHeader.getContentType())) {
			String content = null;
			if(message.getRawContent() != null) {
				String charset = this.getCharacterEncoding();
				if(charset == null) {
					content = new String(message.getRawContent());
				} else {
					content = new String(message.getRawContent(), charset);
				}
			} else {
				content = "";
			}
			return content;
		} else if(contentTypeHeader!= null && CONTENT_TYPE_MULTIPART.equals(contentTypeHeader.getContentType())) {
			try {
				return new MimeMultipart(new ByteArrayDataSource(message.getRawContent(),
						contentTypeHeader.toString().replaceAll(ContentTypeHeader.NAME+": ", "")));
			} catch (MessagingException e) {
				logger.warn("Problem with multipart message.", e);
				return this.message.getRawContent();
			}
		} else {
			return this.message.getRawContent();
		}
	}
74251
public static String printToString(Message message) {
        try {
            StringBuilder text = new StringBuilder();
            print(message, text);
            return text.toString();
        } catch (IOException e) {
            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never "
                                                       + "happen).",
                                       e);
        }
    }
1262852
public String getMessagesForDisplay() {
        if(messages.isEmpty()) {
            return "";
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (String message : messages) {
            stringBuilder.append(message);
            stringBuilder.append("\n");
        }
        String tempStr = stringBuilder.toString();
        stringBuilder.deleteCharAt(tempStr.length() - 1);
        return stringBuilder.toString();
    }
725446
private String formatMessage(final String message) {
        if (null != reformatter) {
            return reformatter.reformat(context, message);
        } else {
            return message;
        }
    }
1020343
public String mac(String message) {
        return Util.toHexString(mac(message.getBytes(StandardCharsets.UTF_8)));
    }
779980
public void sendTextMessage(String message) {
		MessageEnvelope envelope = new MessageEnvelope();
		ReceivedMessage body = new ReceivedMessage();

		body.setText(message);
		envelope.setMessage(body);
		envelope.setSender(new User(facebookMockId));

		System.out.println("Sending message: [" + message + "] as user : ["
				+ facebookMockId + "].");
		forward(envelope);
		System.out.println("Sent!");
	}
974292
def get_charset(message, default="utf-8"):
    """"""
    if message.get_content_charset():
        return message.get_content_charset()
    if message.get_charset():
        return message.get_charset()
    return default
1007984
private String getFormContentType(Message message) {
        return message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE) != null ? message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE).toString() : null;
    }
1178465
@Override
    public String getMessage() {
        if (message_ != null) {
            return message_;
        }

        if (getCause() != null) {
            return getCause().getMessage();
        }

        switch (code_) {
            case UNSPECIFIED_ERR:
                return "unknown error";
            case NOT_SUPPORTED_ERR:
                return "not supported";
            case SYNTAX_ERR:
                return "syntax error";
            default:
                return null;
        }
    }
727691
protected function getContentsFromMessage(?PsrMessageInterface $message): string
    {
        $result = '';
        if ($message !== null) {
            $result = $message->getBody()->getContents();
        }
        return $result;
    }
1177322
public static String getMessage(Throwable t) {

        String message = t.getLocalizedMessage();
        if (message == null) {
            message = t.getMessage();
        }
        if (message == null) {
            message = t.getClass().getName();
        }
        return message;
    }