Examples of HPBFDocument


Examples of org.apache.poi.hpbf.HPBFDocument

    );
    ext.getText();
  }

  public void testContents() throws Exception {
    HPBFDocument doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample.pub")
    );

    PublisherTextExtractor ext =
      new PublisherTextExtractor(doc);
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   2000 and Publisher 2007. Check they all agree.
   * @throws Exception
   */
  public void testMultipleVersions() throws Exception {
    File f;
    HPBFDocument doc;

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample.pub")
    );
    String s2007 = (new PublisherTextExtractor(doc)).getText();

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample2000.pub")
    );
    String s2000 = (new PublisherTextExtractor(doc)).getText();

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample98.pub")
    );
    String s98 = (new PublisherTextExtractor(doc)).getText();

    // Check they all agree
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

  /**
   * Test that the hyperlink extraction stuff works as well
   *  as we can hope it to.
   */
  public void testWithHyperlinks() throws Exception {
    HPBFDocument doc = new HPBFDocument(
                _samples.openResourceAsStream("LinkAt10.pub")
    );

    PublisherTextExtractor ext =
      new PublisherTextExtractor(doc);
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   public PublisherTextExtractor(HPBFDocument doc) {
      super(doc);
      this.doc = doc;
   }
   public PublisherTextExtractor(DirectoryNode dir) throws IOException {
      this(new HPBFDocument(dir));
   }
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   }
   public PublisherTextExtractor(DirectoryNode dir) throws IOException {
      this(new HPBFDocument(dir));
   }
   public PublisherTextExtractor(POIFSFileSystem fs) throws IOException {
      this(new HPBFDocument(fs));
   }
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   }
   public PublisherTextExtractor(POIFSFileSystem fs) throws IOException {
      this(new HPBFDocument(fs));
   }
   public PublisherTextExtractor(NPOIFSFileSystem fs) throws IOException {
      this(new HPBFDocument(fs));
   }
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   public PublisherTextExtractor(InputStream is) throws IOException {
      this(new POIFSFileSystem(is));
   }
   @Deprecated
   public PublisherTextExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
      this(new HPBFDocument(dir, fs));
   }
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

       "0123456789abcdef\n" +
       "0123456789abcdef0123456789abcdef\n" +
       "0123456789abcdef0123456789abcdef0123456789abcdef\n";

  public void testBasics() throws Exception {
    HPBFDocument doc = new HPBFDocument(
        _samples.openResourceAsStream("Sample.pub")
    );

    PublisherTextExtractor ext =
      new PublisherTextExtractor(doc);
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

     PublisherTextExtractor ext;
     File sample = _samples.getFile("Sample.pub");
      File simple = _samples.getFile("Simple.pub");
    
     // Check this complicated file using POIFS
    HPBFDocument docOPOIFS = new HPBFDocument(
          new FileInputStream(sample)
    );
      ext = new PublisherTextExtractor(docOPOIFS);
      assertEquals( SAMPLE_TEXT, ext.getText() );

      // And with NPOIFS
      HPBFDocument docNPOIFS = new HPBFDocument(
            new NPOIFSFileSystem(sample)
      );
    ext = new PublisherTextExtractor(docNPOIFS);
    assertEquals( SAMPLE_TEXT, ext.getText() );
View Full Code Here

Examples of org.apache.poi.hpbf.HPBFDocument

   2000 and Publisher 2007. Check they all agree.
   * @throws Exception
   */
  public void testMultipleVersions() throws Exception {
    File f;
    HPBFDocument doc;

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample.pub")
    );
    String s2007 = (new PublisherTextExtractor(doc)).getText();

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample2000.pub")
    );
    String s2000 = (new PublisherTextExtractor(doc)).getText();

    doc = new HPBFDocument(
                _samples.openResourceAsStream("Sample98.pub")
    );
    String s98 = (new PublisherTextExtractor(doc)).getText();

    // Check they all agree
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.