// sheet cloning errors
"spreadsheet/56450.xls",
- "spreadsheet/OddStyleRecord.xls"
+ "spreadsheet/OddStyleRecord.xls",
+
+ // msg files with non-standard encodings
+ "hsmf/ASCII_CP1251_LCID1049.msg",
+ "hsmf/ASCII_UTF-8_CP1252_LCID1031.msg",
+ "hsmf/ASCII_UTF-8_CP1252_LCID1031_HTML.msg",
+ "hsmf/HTMLBodyBinary_CP1251.msg",
+ "hsmf/HTMLBodyBinary_UTF-8.msg"
);
private static final Set<String> IGNORED = unmodifiableHashSet(
DirectoryChunk chunkDirectory = attachment.getAttachmentDirectory();
if(chunkDirectory != null) {
- MAPIMessage attachmentMSG = chunkDirectory.getAsEmbededMessage();
+ MAPIMessage attachmentMSG = chunkDirectory.getAsEmbeddedMessage();
assertNotNull(attachmentMSG);
String body = attachmentMSG.getTextBody();
assertNotNull(body);
*/
public MAPIMessage getEmbeddedMessage() throws IOException {
if (attachmentDirectory != null) {
- return attachmentDirectory.getAsEmbededMessage();
+ return attachmentDirectory.getAsEmbeddedMessage();
}
return null;
}
import org.apache.poi.hsmf.MAPIMessage;
import org.apache.poi.hsmf.datatypes.Types.MAPIType;
import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.util.Removal;
/**
* A Chunk that is just a placeholder in the MAPIMessage directory structure,
}
/**
- * Treats the directory as an embeded MAPIMessage (it normally is one), and
+ * Treats the directory as an embedded MAPIMessage (it normally is one), and
* returns a MAPIMessage object to process it with.
+ *
+ * @deprecated use {@link #getAsEmbeddedMessage()} instead
*/
+ @Removal(version = "4.3")
+ @Deprecated
public MAPIMessage getAsEmbededMessage() throws IOException {
+ return getAsEmbeddedMessage();
+ }
+
+ /**
+ * Treats the directory as an embedded MAPIMessage (it normally is one), and
+ * returns a MAPIMessage object to process it with.
+ *
+ * @since 4.1.1
+ */
+ public MAPIMessage getAsEmbeddedMessage() throws IOException {
return new MAPIMessage(dir);
}
assertNotNull(attachment.getAttachmentDirectory());
// Check we can see some bits of it
- MAPIMessage nested = attachment.getAttachmentDirectory().getAsEmbededMessage();
+ MAPIMessage nested = attachment.getAttachmentDirectory().getAsEmbeddedMessage();
assertEquals(1, nested.getRecipientNamesList().length);
assertEquals("Nick Booth", nested.getRecipientNames());
assertEquals("Test Attachment", nested.getConversationTopic());