Package org.apache.poi.hsmf

Examples of org.apache.poi.hsmf.MAPIMessage


     
      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

    public OutlookExtractor(POIFSFileSystem filesystem, ParseContext context) throws TikaException {
        super(context);
       
        try {
            this.msg = new MAPIMessage(filesystem);
        } catch (IOException e) {
            throw new TikaException("Failed to parse Outlook message", e);
        }
    }
View Full Code Here

    public OutlookExtractor(DirectoryNode root, ParseContext context) throws TikaException {
        super(context);
       
        try {
            this.msg = new MAPIMessage(root);
        } catch (IOException e) {
            throw new TikaException("Failed to parse Outlook message", e);
        }
    }
View Full Code Here

   * Initialize this test, load up the blank.msg mapi message.
   * @throws Exception
   */
  public TestSimpleFileRead() throws IOException {
    String dirname = System.getProperty("HSMF.testdata.path");
    this.mapiMessage = new MAPIMessage(dirname + "/simple_test_msg.msg");
  }
View Full Code Here

   * Initialize this test, load up the blank.msg mapi message.
   * @throws IOException
   */
  public TestBlankFileRead() throws IOException {
    String dirname = System.getProperty("HSMF.testdata.path");
    this.mapiMessage = new MAPIMessage(dirname + "/blank.msg");
  }
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.