Get MIME entity as text


private String getMimeAsText(MIMEEntity mime) {
	Stream stream = null;
	String returnText = "";
	try {
		Session session = getCurrentSession();
		stream = session.createStream();
		printMIME(mime, stream);
		stream.setPosition(0);
		returnText = stream.readText();
	} catch (NotesException e) {
		e.printStackTrace();
	} finally {
		Utils.incinerate(stream);
	}

	return returnText;
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...