Package org.apache.poi.hpsf

Examples of org.apache.poi.hpsf.Section$PropertyListEntry


            List sections = ps.getSections();
            int nr = 0;
            for (Iterator i = sections.iterator(); i.hasNext();)
            {
                /* Print a single section: */
                Section sec = (Section) i.next();
                out("   Section " + nr++ + ":");
                String s = hex(sec.getFormatID().getBytes());
                s = s.substring(0, s.length() - 1);
                out("      Format ID: " + s);

                /* Print the number of properties in this section. */
                int propertyCount = sec.getPropertyCount();
                out("      No. of properties: " + propertyCount);

                /* Print the properties: */
                Property[] properties = sec.getProperties();
                for (int i2 = 0; i2 < properties.length; i2++)
                {
                    /* Print a single property: */
                    Property p = properties[i2];
                    long id = p.getID();
View Full Code Here


        byte[] b = poiFile.getBytes();
        PropertySet ps =
            PropertySetFactory.create(new ByteArrayInputStream(b));
        Assert.assertTrue(ps.isDocumentSummaryInformation());
        Assert.assertEquals(ps.getSectionCount(), 2);
        Section s = (Section) ps.getSections().get(1);
        Assert.assertEquals(s.getProperty(1),
                            new Integer(1200));
        Assert.assertEquals(s.getProperty(2),
                            new Long(4198897018L));
        Assert.assertEquals(s.getProperty(3),
                            "MCon_Info zu Office bei Schreiner");
        Assert.assertEquals(s.getProperty(4),
                            "petrovitsch@schreiner-online.de");
        Assert.assertEquals(s.getProperty(5),
                            "Petrovitsch, Wilhelm");
    }
View Full Code Here

        byte[] b = poiFile.getBytes();
        PropertySet ps =
            PropertySetFactory.create(new ByteArrayInputStream(b));
        Assert.assertTrue(ps.isDocumentSummaryInformation());
        Assert.assertEquals(ps.getSectionCount(), 2);
        Section s = (Section) ps.getSections().get(1);
        Assert.assertEquals(s.getProperty(1),
                            new Integer(1200));
        Assert.assertEquals(s.getProperty(2),
                            new Long(4198897018L));
        Assert.assertEquals(s.getProperty(3),
                            "MCon_Info zu Office bei Schreiner");
        Assert.assertEquals(s.getProperty(4),
                            "petrovitsch@schreiner-online.de");
        Assert.assertEquals(s.getProperty(5),
                            "Petrovitsch, Wilhelm");
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hpsf.Section$PropertyListEntry

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.