mirror of https://github.com/apache/poi.git
SonarCube fix - make members private
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2aa6ff9f20
commit
41d8585723
|
@ -343,11 +343,11 @@ public class ExtractorFactory {
|
|||
// 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getTextBody() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.textBodyChunk);
|
||||
return getStringFromChunk(mainChunks.getTextBodyChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -201,10 +201,10 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @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 {
|
||||
|
@ -218,7 +218,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getRtfBody() throws ChunkNotFoundException {
|
||||
ByteChunk chunk = mainChunks.rtfBodyChunk;
|
||||
ByteChunk chunk = mainChunks.getRtfBodyChunk();
|
||||
if(chunk == null) {
|
||||
if(returnNullOnMissingChunk) {
|
||||
return null;
|
||||
|
@ -242,7 +242,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getSubject() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.subjectChunk);
|
||||
return getStringFromChunk(mainChunks.getSubjectChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -251,7 +251,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getDisplayFrom() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.displayFromChunk);
|
||||
return getStringFromChunk(mainChunks.getDisplayFromChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -264,7 +264,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getDisplayTo() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.displayToChunk);
|
||||
return getStringFromChunk(mainChunks.getDisplayToChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,7 +277,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getDisplayCC() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.displayCCChunk);
|
||||
return getStringFromChunk(mainChunks.getDisplayCCChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -291,7 +291,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getDisplayBCC() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.displayBCCChunk);
|
||||
return getStringFromChunk(mainChunks.getDisplayBCCChunk());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -516,7 +516,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* 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;
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getConversationTopic() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.conversationTopic);
|
||||
return getStringFromChunk(mainChunks.getConversationTopic());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -541,7 +541,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getMessageClass() throws ChunkNotFoundException {
|
||||
return getStringFromChunk(mainChunks.messageClass);
|
||||
return getStringFromChunk(mainChunks.getMessageClass());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -549,8 +549,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
|||
* 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...
|
||||
|
|
|
@ -151,13 +151,13 @@ public class OutlookTextExtactor extends POIOLE2TextExtractor {
|
|||
// 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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue