Chunk rtfChunk = null; Chunk textChunk = null; for (Chunk chunk : msg.getMainChunks().getChunks()) { if (chunk.getChunkId() == MAPIProperty.BODY_HTML.id) { htmlChunk = chunk;
Map<MAPIProperty, List<PropertyValue>> props = mainChunks.getProperties(); if (props != null) { StringChunk text = mainChunks.getTextBodyChunk(); if (text != null) { CharsetDetector detector = new CharsetDetector();
StringChunk sentByServerType = chunks.getSentByServerType(); if (sentByServerType != null) { metadata.set(Office.MAPI_SENT_BY_SERVER_TYPE, Map<MAPIProperty, List<Chunk>> mainChunks = msg.getMainChunks().getAll();
/** * Gets the date that the message was accepted by the * server on. */ public Calendar getMessageDate() throws ChunkNotFoundException { if (mainChunks.getSubmissionChunk() != null) { return mainChunks.getSubmissionChunk().getAcceptedAtTime(); } else { // Try a few likely suspects... for (MAPIProperty prop : new MAPIProperty[] { MAPIProperty.CLIENT_SUBMIT_TIME, MAPIProperty.LAST_MODIFICATION_TIME, MAPIProperty.CREATION_TIME }) { List<PropertyValue> val = mainChunks.getProperties().get(prop); if (val != null && val.size() > 0) { return ((TimePropertyValue)val.get(0)).getValue(); } } } if(returnNullOnMissingChunk) return null; throw new ChunkNotFoundException(); }
/** * Gets the plain text body of this Outlook Message * @return The string representation of the 'text' version of the body, if available. * @throws ChunkNotFoundException If the text-body chunk does not exist and * returnNullOnMissingChunk is set */ public String getTextBody() throws ChunkNotFoundException { return getStringFromChunk(mainChunks.getTextBodyChunk()); }
public Chunk[] getChunks() { return getAll(); }
MAPIProperty.INTERNET_CPID }) { List<PropertyValue> val = mainChunks.getProperties().get(prop); if (val != null && val.size() > 0) { int codepage = ((LongPropertyValue)val.get(0)).getValue();
public static ChunkGroup[] parse(DirectoryNode node) throws IOException { Chunks mainChunks = new Chunks();
/** * Gets the conversation topic of the parsed Outlook Message. * This is the part of the subject line that is after the RE: and FWD: * @throws ChunkNotFoundException If the conversation-topic chunk does not exist and * returnNullOnMissingChunk is set */ public String getConversationTopic() throws ChunkNotFoundException { return getStringFromChunk(mainChunks.getConversationTopic()); }
for(Chunk c : mainChunks.getAll()) { if(c instanceof StringChunk) { ((StringChunk)c).set7BitEncoding(charset);
public static ChunkGroup[] parse(DirectoryNode node) throws IOException { Chunks mainChunks = new Chunks();
Map<MAPIProperty, List<PropertyValue>> props = mainChunks.getProperties(); if (props != null) { StringChunk text = mainChunks.getTextBodyChunk(); if (text != null) { CharsetDetector detector = new CharsetDetector();
for(Chunk c : mainChunks.getChunks()) { if(c instanceof StringChunk) { if( c.getType() == Types.ASCII_STRING ) {
StringChunk sentByServerType = chunks.getSentByServerType(); if (sentByServerType != null) { metadata.set(Office.MAPI_SENT_BY_SERVER_TYPE, Map<MAPIProperty, List<Chunk>> mainChunks = msg.getMainChunks().getAll();
for(Chunk c : mainChunks.getAll()) { if(c instanceof StringChunk) { if( ((StringChunk)c).getType() == Types.ASCII_STRING ) {
Map<MAPIProperty, List<PropertyValue>> props = mainChunks.getProperties(); if (props != null) { StringChunk text = mainChunks.getTextBodyChunk(); if (text != null) { CharsetDetector detector = new CharsetDetector();
for(Chunk c : mainChunks.getChunks()) { if(c instanceof StringChunk) { ((StringChunk)c).set7BitEncoding(charset);
StringChunk sentByServerType = chunks.getSentByServerType(); if (sentByServerType != null) { metadata.set(Office.MAPI_SENT_BY_SERVER_TYPE, Map<MAPIProperty, List<Chunk>> mainChunks = msg.getMainChunks().getAll();
Map<MAPIProperty, List<PropertyValue>> props = mainChunks.getProperties(); if (props != null) { StringChunk text = mainChunks.getTextBodyChunk(); if (text != null) { CharsetDetector detector = new CharsetDetector();
Chunk rtfChunk = null; Chunk textChunk = null; for (Chunk chunk : msg.getMainChunks().getChunks()) { if (chunk.getChunkId() == MAPIProperty.BODY_HTML.id) { htmlChunk = chunk;