Package org.apache.poi

Examples of org.apache.poi.POIDataSamples$NonSeekableInputStream


    String filename2 = "test.doc";
    filename3 = "excel_with_embeded.xls";
    filename4 = "ThreeColHeadFoot.doc";
    filename5 = "HeaderFooterUnicode.doc";
    filename6 = "footnote.doc";
        POIDataSamples docTests = POIDataSamples.getDocumentInstance();
    extractor = new WordExtractor(docTests.openResourceAsStream(filename));
    extractor2 = new WordExtractor(docTests.openResourceAsStream(filename2));

    // Build splat'd out text version
    for(int i=0; i<p_text1.length; i++) {
      p_text1_block += p_text1[i];
    }
View Full Code Here


   */
  private XSLFSlideShow xmlA;
  private OPCPackage pkg;

  protected void setUp() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    pkg = OPCPackage.open(slTests.openResourceAsStream("sample.pptx"));
    xmlA = new XSLFSlideShow(pkg);
  }
View Full Code Here

        "\n\n\n\n", text
    );
  }
 
  public void testGetComments() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("45545_Comment.pptx")));
    XSLFPowerPointExtractor extractor =
      new XSLFPowerPointExtractor(xmlA);
   
    String text = extractor.getText();
    assertTrue(text.length() > 0);
View Full Code Here

   */
  private XSLFSlideShow xmlA;
  private OPCPackage pkg;

  protected void setUp() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    pkg = OPCPackage.open(slTests.openResourceAsStream("sample.pptx"));
    xmlA = new XSLFSlideShow(pkg);
  }
View Full Code Here

        "\n\n\n\n", text
    );
  }
 
  public void testGetComments() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("45545_Comment.pptx")));
    XSLFPowerPointExtractor extractor =
      new XSLFPowerPointExtractor(xmlA);
   
    String text = extractor.getText();
    assertTrue(text.length() > 0);
View Full Code Here

    // Check comments are there
    assertTrue("Unable to find expected word in text\n" + text, text.contains("testdoc"));
  }

    public void testTable() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
        xmlA = new XSLFSlideShow(OPCPackage.open(slTests.openResourceAsStream("present1.pptx")));
        XSLFPowerPointExtractor extractor =
            new XSLFPowerPointExtractor(xmlA);

        String text = extractor.getText();
        assertTrue(text.length() > 0);
View Full Code Here

   private File pub;

   protected void setUp() throws Exception {
      super.setUp();

      POIDataSamples ssTests = POIDataSamples.getSpreadSheetInstance();
      xls = ssTests.getFile("SampleSS.xls");
      xlsx = ssTests.getFile("SampleSS.xlsx");
      xltx = ssTests.getFile("test.xltx");
      xlsEmb = ssTests.getFile("excel_with_embeded.xls");

      POIDataSamples wpTests = POIDataSamples.getDocumentInstance();
      doc = wpTests.getFile("SampleDoc.doc");
      docx = wpTests.getFile("SampleDoc.docx");
      dotx = wpTests.getFile("test.dotx");
      docEmb = wpTests.getFile("word_with_embeded.doc");

      POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
      ppt = slTests.getFile("SampleShow.ppt");
      pptx = slTests.getFile("SampleShow.pptx");
      txt = slTests.getFile("SampleShow.txt");

      POIDataSamples dgTests = POIDataSamples.getDiagramInstance();
      vsd = dgTests.getFile("Test_Visio-Some_Random_Text.vsd");
     
      POIDataSamples pubTests = POIDataSamples.getPublisherInstance();
      pub = pubTests.getFile("Simple.pub");
     
      POIDataSamples olTests = POIDataSamples.getHSMFInstance();
      msg = olTests.getFile("quick.msg");
      msgEmb = olTests.getFile("attachment_test_msg.msg");
   }
View Full Code Here

    * Initialize this test, load up the attachment_test_msg.msg mapi message.
    *
    * @throws Exception
    */
   public TestFileWithAttachmentsRead() throws IOException {
      POIDataSamples samples = POIDataSamples.getHSMFInstance();
      this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("attachment_test_msg.msg"));
   }
View Full Code Here

  /**
   * Initialize this test, load up the blank.msg mapi message.
   * @throws Exception
   */
  public TestBasics() throws IOException {
        POIDataSamples samples = POIDataSamples.getHSMFInstance();
    simple = new MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
      quick  = new MAPIMessage(samples.openResourceAsStream("quick.msg"));
      outlook30  = new MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
      attachments = new MAPIMessage(samples.openResourceAsStream("attachment_test_msg.msg"));
      noRecipientAddress = new MAPIMessage(samples.openResourceAsStream("no_recipient_address.msg"));
  }
View Full Code Here

  public void testShortLastBlock() throws Exception {
    String[] files = new String[] {
      "ShortLastBlock.qwp", "ShortLastBlock.wps"
    };

    POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
    for(int i=0; i<files.length; i++) {

      // Open the file up
      POIFSFileSystem fs = new POIFSFileSystem(
          _samples.openResourceAsStream(files[i])
      );

      // Write it into a temp output array
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      fs.writeFilesystem(baos);
View Full Code Here

TOP

Related Classes of org.apache.poi.POIDataSamples$NonSeekableInputStream

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.