* contains a RTF (rich) version.
* @return The string representation of the 'RTF' version of the body, if available.
* @throws ChunkNotFoundException
*/
public String getRtfBody() throws ChunkNotFoundException {
ByteChunk chunk = mainChunks.rtfBodyChunk;
if(chunk == null) {
if(returnNullOnMissingChunk) {
return null;
} else {
throw new ChunkNotFoundException();
}
}
try {
MAPIRtfAttribute rtf = new MAPIRtfAttribute(
MAPIProperty.RTF_COMPRESSED, Types.BINARY.getId(), chunk.getValue()
);
return rtf.getDataString();
} catch(IOException e) {
throw new RuntimeException("Shouldn't happen", e);
}