mirror of https://github.com/apache/poi.git
Fix typo, leave the old version there deprecated for now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1179787 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a5bbe4ab6
commit
0598dbf42c
|
@ -185,12 +185,16 @@ public class MAPIMessage extends POIDocument {
|
|||
* @return The string representation of the 'html' version of the body, if available.
|
||||
* @throws ChunkNotFoundException
|
||||
*/
|
||||
public String getHmtlBody() throws ChunkNotFoundException {
|
||||
public String getHtmlBody() throws ChunkNotFoundException {
|
||||
if(mainChunks.htmlBodyChunkBinary != null) {
|
||||
return mainChunks.htmlBodyChunkBinary.getAs7bitString();
|
||||
}
|
||||
return getStringFromChunk(mainChunks.htmlBodyChunkString);
|
||||
}
|
||||
@Deprecated
|
||||
public String getHmtlBody() throws ChunkNotFoundException {
|
||||
return getHtmlBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the RTF Rich Message body of this Outlook Message, if this email
|
||||
|
|
|
@ -222,7 +222,7 @@ public final class TestBasics extends TestCase {
|
|||
fail("File doesn't have headers!");
|
||||
} catch(ChunkNotFoundException e) {}
|
||||
|
||||
String html = chinese.getHmtlBody();
|
||||
String html = chinese.getHtmlBody();
|
||||
assertTrue("Charset not found:\n" + html, html.contains("text/html; charset=big5"));
|
||||
|
||||
// Defaults to CP1251
|
||||
|
|
|
@ -134,7 +134,7 @@ private MAPIMessage mapiMessage;
|
|||
* Ensure we can get the HTML and RTF versions
|
||||
*/
|
||||
public void testReadBodyContents() throws Exception {
|
||||
String html = mapiMessage.getHmtlBody();
|
||||
String html = mapiMessage.getHtmlBody();
|
||||
String rtf = mapiMessage.getRtfBody();
|
||||
assertNotNull(html);
|
||||
assertNotNull(rtf);
|
||||
|
|
Loading…
Reference in New Issue