Package org.apache.poi.hsmf

Examples of org.apache.poi.hsmf.MAPIMessage


 
   public void testQuick() throws Exception {
      POIFSFileSystem simple = new POIFSFileSystem(
            new FileInputStream(samples.getFile("quick.msg"))
      );
      MAPIMessage msg = new MAPIMessage(simple);
     
      OutlookTextExtactor ext = new OutlookTextExtactor(msg);
      String text = ext.getText();
     
      assertContains(text, "From: Kevin Roast\n");
View Full Code Here


      assertContains(text, "Date: " + dateText + "\n");
      assertContains(text, "The quick brown fox jumps over the lazy dog");
   }
  
   public void testSimple() throws Exception {
      MAPIMessage msg = new MAPIMessage(new POIFSFileSystem(
            new FileInputStream(samples.getFile("simple_test_msg.msg"))
      ));
     
      OutlookTextExtactor ext = new OutlookTextExtactor(msg);
      String text = ext.getText();
View Full Code Here

            samples.getFile("simple_test_msg.msg")
      )).getText());
      String poifs = (new OutlookTextExtactor(new POIFSFileSystem(new FileInputStream(
            samples.getFile("simple_test_msg.msg")
      ))).getText());
      String mapi = (new OutlookTextExtactor(new MAPIMessage(new FileInputStream(
            samples.getFile("simple_test_msg.msg")
      ))).getText());
     
      assertEquals(inp, poifs);
      assertEquals(inp, mapi);
View Full Code Here

     
      String[] files = new String[] {
            "example_sent_regular.msg", "example_sent_unicode.msg"
      };
      for(String file : files) {
         MAPIMessage msg = new MAPIMessage(new POIFSFileSystem(
               new FileInputStream(samples.getFile(file))
         ));
        
         OutlookTextExtactor ext = new OutlookTextExtactor(msg);
         String text = ext.getText();
View Full Code Here

     
      String[] files = new String[] {
            "example_received_regular.msg", "example_received_unicode.msg"
      };
      for(String file : files) {
         MAPIMessage msg = new MAPIMessage(new POIFSFileSystem(
               new FileInputStream(samples.getFile(file))
         ));
        
         OutlookTextExtactor ext = new OutlookTextExtactor(msg);
         String text = ext.getText();
View Full Code Here

    */
   public void testWithAttachments() throws Exception {
      POIFSFileSystem simple = new POIFSFileSystem(
            new FileInputStream(samples.getFile("attachment_test_msg.msg"))
      );
      MAPIMessage msg = new MAPIMessage(simple);
      OutlookTextExtactor ext = new OutlookTextExtactor(msg);
     
      // Check the normal bits
      String text = ext.getText();
     
View Full Code Here

  
   public void testEncodings() throws Exception {
      POIFSFileSystem simple = new POIFSFileSystem(
            new FileInputStream(samples.getFile("chinese-traditional.msg"))
      );
      MAPIMessage msg = new MAPIMessage(simple);
      OutlookTextExtactor ext = new OutlookTextExtactor(msg);
      String text = ext.getText();
     
      // Check the english bits
      assertContains(text, "From: Tests Chang@FT");
View Full Code Here

   /**
    * Use {@link #OutlookTextExtactor(DirectoryNode)} instead
    */
   @Deprecated
   public OutlookTextExtactor(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException {
      this(new MAPIMessage(poifsDir, fs));
   }
View Full Code Here

   @Deprecated
   public OutlookTextExtactor(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException {
      this(new MAPIMessage(poifsDir, fs));
   }
   public OutlookTextExtactor(DirectoryNode poifsDir) throws IOException {
      this(new MAPIMessage(poifsDir));
   }
View Full Code Here

   }
   public OutlookTextExtactor(DirectoryNode poifsDir) throws IOException {
      this(new MAPIMessage(poifsDir));
   }
   public OutlookTextExtactor(POIFSFileSystem fs) throws IOException {
      this(new MAPIMessage(fs));
   }
View Full Code Here

TOP

Related Classes of org.apache.poi.hsmf.MAPIMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.