// Decide what to attach it to, based on the levels and IDs
if(level == TNEFProperty.LEVEL_MESSAGE) {
messageAttributes.add(attr);
if(attr instanceof TNEFMAPIAttribute) {
TNEFMAPIAttribute tnefMAPI = (TNEFMAPIAttribute)attr;
mapiAttributes.addAll( tnefMAPI.getMAPIAttributes() );
}
} else if(level == TNEFProperty.LEVEL_ATTACHMENT) {
// Previous attachment or a new one?
if(attachments.size() == 0 || attr.getProperty() == TNEFProperty.ID_ATTACHRENDERDATA) {
attachments.add(new Attachment());