DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=44055>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44055 Summary: No access to the "FROM" field in an Outlook MSG file using MAPIMessage Product: POI Version: 3.0-dev Platform: All OS/Version: All Status: NEW Keywords: PatchAvailable Severity: enhancement Priority: P3 Component: POI Overall AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Ive been using org.apache.poi.hsmf.MAPIMessage to handle reading the contents of Outlook MSG files and I noticed that for some reason there was no accessor method for getting at the FROM field. Im not sure if this was omitted for a reason but its absence seemed strange so I decided to try and add it. I gleaned from the HSMF javadoc that the various fields in a MSG file can be identified by looking for OLE nodes with the following name __substg1.0_<chunk_id><chunk_type> Where <chunk_type> is an arbitrary HEX code indicating what data type the property has and <chunk_id> is an arbitrary HEX code that identifies each property. I did some searching through some sample MSG files and narrowed down the FROM field to one of the following two chunk Ids: 0x0042 or 0x0C1A Both seemed to work equally well in the files I tested on. This patch contains the following changes: - Added displayFromChunk to instance to org.apache.poi.hsmf.datatypes.Chunks - Added getDispalyFrom accessor method to org.apache.poi.hsmf.MAPIMessage - Added a method to org.apache.poi.hsmf.model.TestBlankFileRead to test reading the FROM field - Added a method to org.apache.poi.hsmf.model.TestSimpleFileRead to test reading the FROM field I also added an overloaded constructor to MAPIMessage that takes in an InputStream (as opposed to just a file name). This change had nothing to do with the accessing the FROM field but was useful for the interface I was implementing and didnt seem to cost anything in terms of extra complexity in the code. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
