You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/12/11 13:00:02 UTC
DO NOT REPLY [Bug 47991] HSMF - All .msg attachments have zeros at
the end of the files
https://issues.apache.org/bugzilla/show_bug.cgi?id=47991
--- Comment #2 from yoda@oleco.net 2009-12-11 04:00:00 UTC ---
Created an attachment (id=24690)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24690)
Test files as zip, contains msg and attachments before and after processing
My sample code:
MAPIMessage mapiMsg = new MAPIMessage( new FileInputStream( new
File("plain.msg") ) );
Map<String, ByteArrayInputStream> atts = mapiMsg.getAttachmentFiles();
if( atts != null && atts.size() == 1 )
{
String attName = atts.keySet().iterator().next();
ByteArrayInputStream att = atts.get( attName );
FileUtils.stream( att, new FileOutputStream( new File("after.txt") ) );
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org