* @param extensionBackup For example ".xml"
* @return null if no such attachment was found
*/
// public AttachmentHolder getEncodedMsgUnitByExtension(String extension, String extensionZ, String extensionBackup) {
public AttachmentHolder getMsgUnitAttachment() {
MsgInfoParserFactory fac = MsgInfoParserFactory.instance();
AttachmentHolder[] atts = getAttachments();
for (int j = 0; j < atts.length; j++) {
if (fac.parserExists(atts[j].getFileName(), atts[j].getContentType())) {
return atts[j];
}
}
return null;
}