I have a HMEFMessage
and iterating all attachments using
for (Attachment tnefAttachment : hmef.getAttachments()) {
Attachment size can be obtained using tnefAttachment.getMAPIAttribute(MAPIProperty.ATTACH_SIZE)
. This method returns MAPIAttribute instance and it has only getData(), which returns byte[].
How can I convert byte[] from MAPIAttribute to Long (size)?
According to this - https://poi.apache.org/apidocs/org/apache/poi/hmef/attribute/package-summary.html - there is a MAPIStringAttribute.getAsString(attr), which does not work with ATTACH_SIZE.
EDIT - ATTACH_SIZE is Long according to http://grepcode.com/file/repo1.maven.org/maven2/org.openl.rules/org.openl.lib.poi.dev/5.9.4.1/org/apache/poi/hsmf/datatypes/MAPIProperty.java .