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
|
// Stored in the Attachment blocks
|
||||||
MAPIMessage msg = ((OutlookTextExtactor)ext).getMAPIMessage();
|
MAPIMessage msg = ((OutlookTextExtactor)ext).getMAPIMessage();
|
||||||
for (AttachmentChunks attachment : msg.getAttachmentFiles()) {
|
for (AttachmentChunks attachment : msg.getAttachmentFiles()) {
|
||||||
if (attachment.attachData != null) {
|
if (attachment.getAttachData() != null) {
|
||||||
byte[] data = attachment.attachData.getValue();
|
byte[] data = attachment.getAttachData().getValue();
|
||||||
nonPOIFS.add( new ByteArrayInputStream(data) );
|
nonPOIFS.add( new ByteArrayInputStream(data) );
|
||||||
} else if (attachment.attachmentDirectory != null) {
|
} else if (attachment.getAttachmentDirectory() != null) {
|
||||||
dirs.add(attachment.attachmentDirectory.getDirectory());
|
dirs.add(attachment.getAttachmentDirectory().getDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||||
* @throws ChunkNotFoundException
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getTextBody() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getHtmlBody() throws ChunkNotFoundException {
|
public String getHtmlBody() throws ChunkNotFoundException {
|
||||||
if(mainChunks.htmlBodyChunkBinary != null) {
|
if(mainChunks.getHtmlBodyChunkBinary() != null) {
|
||||||
return mainChunks.htmlBodyChunkBinary.getAs7bitString();
|
return mainChunks.getHtmlBodyChunkBinary().getAs7bitString();
|
||||||
}
|
}
|
||||||
return getStringFromChunk(mainChunks.htmlBodyChunkString);
|
return getStringFromChunk(mainChunks.getHtmlBodyChunkString());
|
||||||
}
|
}
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getHmtlBody() throws ChunkNotFoundException {
|
public String getHmtlBody() throws ChunkNotFoundException {
|
||||||
|
@ -218,7 +218,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||||
* @throws ChunkNotFoundException
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getRtfBody() throws ChunkNotFoundException {
|
public String getRtfBody() throws ChunkNotFoundException {
|
||||||
ByteChunk chunk = mainChunks.rtfBodyChunk;
|
ByteChunk chunk = mainChunks.getRtfBodyChunk();
|
||||||
if(chunk == null) {
|
if(chunk == null) {
|
||||||
if(returnNullOnMissingChunk) {
|
if(returnNullOnMissingChunk) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -242,7 +242,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||||
* @throws ChunkNotFoundException
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getSubject() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getDisplayFrom() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getDisplayTo() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getDisplayCC() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getDisplayBCC() 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
|
* Returns all the headers, one entry per line
|
||||||
*/
|
*/
|
||||||
public String[] getHeaders() throws ChunkNotFoundException {
|
public String[] getHeaders() throws ChunkNotFoundException {
|
||||||
String headers = getStringFromChunk(mainChunks.messageHeaders);
|
String headers = getStringFromChunk(mainChunks.getMessageHeaders());
|
||||||
if(headers == null) {
|
if(headers == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -529,7 +529,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
|
||||||
* @throws ChunkNotFoundException
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getConversationTopic() 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
|
* @throws ChunkNotFoundException
|
||||||
*/
|
*/
|
||||||
public String getMessageClass() 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.
|
* server on.
|
||||||
*/
|
*/
|
||||||
public Calendar getMessageDate() throws ChunkNotFoundException {
|
public Calendar getMessageDate() throws ChunkNotFoundException {
|
||||||
if (mainChunks.submissionChunk != null) {
|
if (mainChunks.getSubmissionChunk() != null) {
|
||||||
return mainChunks.submissionChunk.getAcceptedAtTime();
|
return mainChunks.getSubmissionChunk().getAcceptedAtTime();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Try a few likely suspects...
|
// Try a few likely suspects...
|
||||||
|
|
|
@ -151,13 +151,13 @@ public class OutlookTextExtactor extends POIOLE2TextExtractor {
|
||||||
// Display attachment names
|
// Display attachment names
|
||||||
// To get the attachments, use ExtractorFactory
|
// To get the attachments, use ExtractorFactory
|
||||||
for(AttachmentChunks att : msg.getAttachmentFiles()) {
|
for(AttachmentChunks att : msg.getAttachmentFiles()) {
|
||||||
StringChunk name = att.attachLongFileName;
|
StringChunk name = att.getAttachLongFileName();
|
||||||
if (name == null) name = att.attachFileName;
|
if (name == null) name = att.getAttachFileName();
|
||||||
String attName = name == null ? null : name.getValue();
|
String attName = name == null ? null : name.getValue();
|
||||||
|
|
||||||
if(att.attachMimeTag != null &&
|
if(att.getAttachMimeTag() != null &&
|
||||||
att.attachMimeTag.getValue() != null) {
|
att.getAttachMimeTag().getValue() != null) {
|
||||||
attName = att.attachMimeTag.getValue() + " = " + attName;
|
attName = att.getAttachMimeTag().getValue() + " = " + attName;
|
||||||
}
|
}
|
||||||
s.append("Attachment: " + attName + "\n");
|
s.append("Attachment: " + attName + "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue