You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2016/06/09 12:52:52 UTC

svn commit: r1747543 - in /poi/site: publish/hmef/index.html src/documentation/content/xdocs/hmef/index.xml

Author: nick
Date: Thu Jun  9 12:52:52 2016
New Revision: 1747543

URL: http://svn.apache.org/viewvc?rev=1747543&view=rev
Log:
#59679 Fix code samples, and update limitations + versions

Modified:
    poi/site/publish/hmef/index.html
    poi/site/src/documentation/content/xdocs/hmef/index.xml

Modified: poi/site/publish/hmef/index.html
URL: http://svn.apache.org/viewvc/poi/site/publish/hmef/index.html?rev=1747543&r1=1747542&r2=1747543&view=diff
==============================================================================
--- poi/site/publish/hmef/index.html (original)
+++ poi/site/publish/hmef/index.html Thu Jun  9 12:52:52 2016
@@ -182,7 +182,7 @@ if (VERSION > 3) {
              files into, eg:</p>
            
 <pre class="code">
-              java -classpath poi-3.8-FINAL.jar:poi-scratchpad-3.8-FINAL.jar org.apache.poi.hmef.extractor.HMEFContentsExtractor winmail.dat /tmp/extracted/
+              java -classpath poi-3.14.jar:poi-scratchpad-3.14.jar org.apache.poi.hmef.extractor.HMEFContentsExtractor winmail.dat /tmp/extracted/
            </pre>
 
            
@@ -315,22 +315,22 @@ public void extract(String winmailFilena
            
 <pre class="code">
 HMEFMessage msg = new HMEFMessage(new FileInputStream(file));
-for(TNEFAttribute attr : msg.getMessageAttributes) {
+for(TNEFAttribute attr : msg.getMessageAttributes()) {
    System.out.println("TNEF : " + attr);
 }
-for(MAPIAttribute attr : msg.getMessageMAPIAttributes) {
+for(MAPIAttribute attr : msg.getMessageMAPIAttributes()) {
    System.out.println("MAPI : " + attr);
 }
 System.out.println("Subject is " + msg.getMessageMAPIAttribute(MAPIProperty.CONVERSATION_TOPIC));
 
 for(Attachment attach : msg.getAttachments()) {
-   for(TNEFAttribute attr : attach.getAttributes) {
+   for(TNEFAttribute attr : attach.getAttributes()) {
       System.out.println("A.TNEF : " + attr);
    }
-   for(MAPIAttribute attr : attach.getMAPIAttributes) {
+   for(MAPIAttribute attr : attach.getMAPIAttributes()) {
       System.out.println("A.MAPI : " + attr);
    }
-   System.out.println("Filename is " + attach.getAttribute(TNEFProperty.CID_ATTACHTITLE));
+   System.out.println("Filename is " + attach.getAttribute(TNEFProperty.ID_ATTACHTITLE));
    System.out.println("Extension is " + attach.getMAPIAttribute(MAPIProperty.ATTACH_EXTENSION));
 }
            </pre>
@@ -373,6 +373,9 @@ for(Attachment attach : msg.getAttachmen
               English documents. We think we're correctly turning bytes into
               Java unicode strings, but we need a few non-English sample
               files in the test suite to verify this!</li>
+            
+<li>There is no support for saving changes, nor for creating new
+              files</li>
           
 </ul>
        

Modified: poi/site/src/documentation/content/xdocs/hmef/index.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/hmef/index.xml?rev=1747543&r1=1747542&r2=1747543&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/hmef/index.xml (original)
+++ poi/site/src/documentation/content/xdocs/hmef/index.xml Thu Jun  9 12:52:52 2016
@@ -73,7 +73,7 @@
              TNEF file to extract, and the directory to place the extracted
              files into, eg:</p>
            <source>
-              java -classpath poi-3.8-FINAL.jar:poi-scratchpad-3.8-FINAL.jar org.apache.poi.hmef.extractor.HMEFContentsExtractor winmail.dat /tmp/extracted/
+              java -classpath poi-3.14.jar:poi-scratchpad-3.14.jar org.apache.poi.hmef.extractor.HMEFContentsExtractor winmail.dat /tmp/extracted/
            </source>
 
            <p>From Java, there are two method calls on the class, one to
@@ -160,22 +160,22 @@ public void extract(String winmailFilena
              TNEF or MAPI property.</p>
            <source>
 HMEFMessage msg = new HMEFMessage(new FileInputStream(file));
-for(TNEFAttribute attr : msg.getMessageAttributes) {
+for(TNEFAttribute attr : msg.getMessageAttributes()) {
    System.out.println("TNEF : " + attr);
 }
-for(MAPIAttribute attr : msg.getMessageMAPIAttributes) {
+for(MAPIAttribute attr : msg.getMessageMAPIAttributes()) {
    System.out.println("MAPI : " + attr);
 }
 System.out.println("Subject is " + msg.getMessageMAPIAttribute(MAPIProperty.CONVERSATION_TOPIC));
 
 for(Attachment attach : msg.getAttachments()) {
-   for(TNEFAttribute attr : attach.getAttributes) {
+   for(TNEFAttribute attr : attach.getAttributes()) {
       System.out.println("A.TNEF : " + attr);
    }
-   for(MAPIAttribute attr : attach.getMAPIAttributes) {
+   for(MAPIAttribute attr : attach.getMAPIAttributes()) {
       System.out.println("A.MAPI : " + attr);
    }
-   System.out.println("Filename is " + attach.getAttribute(TNEFProperty.CID_ATTACHTITLE));
+   System.out.println("Filename is " + attach.getAttribute(TNEFProperty.ID_ATTACHTITLE));
    System.out.println("Extension is " + attach.getMAPIAttribute(MAPIProperty.ATTACH_EXTENSION));
 }
            </source>
@@ -205,6 +205,8 @@ for(Attachment attach : msg.getAttachmen
               English documents. We think we're correctly turning bytes into
               Java unicode strings, but we need a few non-English sample
               files in the test suite to verify this!</li>
+            <li>There is no support for saving changes, nor for creating new
+              files</li>
           </ul>
        </section>
     </body>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org