// Stored in the Attachment blocks
MAPIMessage msg = ((OutlookTextExtactor)ext).getMAPIMessage();
for (AttachmentChunks attachment : msg.getAttachmentFiles()) {
- if (attachment.attachData != null) {
- byte[] data = attachment.attachData.getValue();
+ if (attachment.getAttachData() != null) {
+ byte[] data = attachment.getAttachData().getValue();
nonPOIFS.add( new ByteArrayInputStream(data) );
- } else if (attachment.attachmentDirectory != null) {
- dirs.add(attachment.attachmentDirectory.getDirectory());
+ } else if (attachment.getAttachmentDirectory() != null) {
+ dirs.add(attachment.getAttachmentDirectory().getDirectory());
}
}
}
* @throws ChunkNotFoundException
*/
public String getTextBody() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.textBodyChunk);
+ return getStringFromChunk(mainChunks.getTextBodyChunk());
}
/**
* @throws ChunkNotFoundException
*/
public String getHtmlBody() throws ChunkNotFoundException {
- if(mainChunks.htmlBodyChunkBinary != null) {
- return mainChunks.htmlBodyChunkBinary.getAs7bitString();
+ if(mainChunks.getHtmlBodyChunkBinary() != null) {
+ return mainChunks.getHtmlBodyChunkBinary().getAs7bitString();
}
- return getStringFromChunk(mainChunks.htmlBodyChunkString);
+ return getStringFromChunk(mainChunks.getHtmlBodyChunkString());
}
@Deprecated
public String getHmtlBody() throws ChunkNotFoundException {
* @throws ChunkNotFoundException
*/
public String getRtfBody() throws ChunkNotFoundException {
- ByteChunk chunk = mainChunks.rtfBodyChunk;
+ ByteChunk chunk = mainChunks.getRtfBodyChunk();
if(chunk == null) {
if(returnNullOnMissingChunk) {
return null;
* @throws ChunkNotFoundException
*/
public String getSubject() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.subjectChunk);
+ return getStringFromChunk(mainChunks.getSubjectChunk());
}
/**
* @throws ChunkNotFoundException
*/
public String getDisplayFrom() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.displayFromChunk);
+ return getStringFromChunk(mainChunks.getDisplayFromChunk());
}
/**
* @throws ChunkNotFoundException
*/
public String getDisplayTo() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.displayToChunk);
+ return getStringFromChunk(mainChunks.getDisplayToChunk());
}
/**
* @throws ChunkNotFoundException
*/
public String getDisplayCC() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.displayCCChunk);
+ return getStringFromChunk(mainChunks.getDisplayCCChunk());
}
/**
* @throws ChunkNotFoundException
*/
public String getDisplayBCC() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.displayBCCChunk);
+ return getStringFromChunk(mainChunks.getDisplayBCCChunk());
}
/**
* Returns all the headers, one entry per line
*/
public String[] getHeaders() throws ChunkNotFoundException {
- String headers = getStringFromChunk(mainChunks.messageHeaders);
+ String headers = getStringFromChunk(mainChunks.getMessageHeaders());
if(headers == null) {
return null;
}
* @throws ChunkNotFoundException
*/
public String getConversationTopic() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.conversationTopic);
+ return getStringFromChunk(mainChunks.getConversationTopic());
}
/**
* @throws ChunkNotFoundException
*/
public String getMessageClass() throws ChunkNotFoundException {
- return getStringFromChunk(mainChunks.messageClass);
+ return getStringFromChunk(mainChunks.getMessageClass());
}
/**
* server on.
*/
public Calendar getMessageDate() throws ChunkNotFoundException {
- if (mainChunks.submissionChunk != null) {
- return mainChunks.submissionChunk.getAcceptedAtTime();
+ if (mainChunks.getSubmissionChunk() != null) {
+ return mainChunks.getSubmissionChunk().getAcceptedAtTime();
}
else {
// Try a few likely suspects...
// Display attachment names
// To get the attachments, use ExtractorFactory
for(AttachmentChunks att : msg.getAttachmentFiles()) {
- StringChunk name = att.attachLongFileName;
- if (name == null) name = att.attachFileName;
+ StringChunk name = att.getAttachLongFileName();
+ if (name == null) name = att.getAttachFileName();
String attName = name == null ? null : name.getValue();
- if(att.attachMimeTag != null &&
- att.attachMimeTag.getValue() != null) {
- attName = att.attachMimeTag.getValue() + " = " + attName;
+ if(att.getAttachMimeTag() != null &&
+ att.getAttachMimeTag().getValue() != null) {
+ attName = att.getAttachMimeTag().getValue() + " = " + attName;
}
s.append("Attachment: " + attName + "\n");
}