Package org.apache.poi.poifs.property

Examples of org.apache.poi.poifs.property.PropertyTable


    /**
     * Constructor, intended for writing
     */
    public POIFSFileSystem()
    {
        _property_table = new PropertyTable();
        _documents      = new ArrayList();
        _root           = null;
    }
View Full Code Here


                                       header_block_reader.getXBATCount(),
                                       header_block_reader.getXBATIndex(),
                                       data_blocks);

        // get property table from the document
        PropertyTable properties =
            new PropertyTable(header_block_reader.getPropertyStart(),
                              data_blocks);

        // init documents
        processProperties(
            SmallBlockTableReader.getSmallDocumentBlocks(
                data_blocks, properties.getRoot(),
                header_block_reader.getSBATStart()
            ),
            data_blocks,
            properties.getRoot().getChildren(),
            null,
            header_block_reader.getPropertyStart()
        );

        // For whatever reason CLSID of root is always 0.
        getRoot().setStorageClsid(properties.getRoot().getStorageClsid());
    }
View Full Code Here

        // need to initialize the block list with a block allocation
        // table
        new BlockAllocationTableReader(1, bat_array, 0, -2, data_blocks);

        // get property table from the document
        PropertyTable properties = new PropertyTable(0, data_blocks);
        RootProperty  root       = properties.getRoot();
        BlockList     bl         =
            SmallBlockTableReader.getSmallDocumentBlocks(data_blocks, root,
                14);
    }
View Full Code Here

            .add(new POIFSDocument("doc8",
                                   new ByteArrayInputStream(new byte[ 8 ])));
        documents
            .add(new POIFSDocument("doc9",
                                   new ByteArrayInputStream(new byte[ 9 ])));
        RootProperty               root = new PropertyTable().getRoot();
        SmallBlockTableWriter      sbtw = new SmallBlockTableWriter(documents,
                                              root);
        BlockAllocationTableWriter bat  = sbtw.getSBAT();

        // 15 small blocks: 6 for doc340, 0 for doc5000 (too big), 0
View Full Code Here

    // need to initialize the block list with a block allocation
    // table
    new BlockAllocationTableReader(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 1, bat_array, 0, -2, data_blocks);

    // get property table from the document
    PropertyTable properties = new PropertyTable(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 0, data_blocks);
    RootProperty root = properties.getRoot();
    BlockList bl = SmallBlockTableReader.getSmallDocumentBlocks(
          POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, data_blocks, root, 14);
    assertNotNull(bl);
  }
View Full Code Here

            .add(new POIFSDocument("doc8",
                                   new ByteArrayInputStream(new byte[ 8 ])));
        documents
            .add(new POIFSDocument("doc9",
                                   new ByteArrayInputStream(new byte[ 9 ])));
        RootProperty               root = new PropertyTable(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS).getRoot();
        SmallBlockTableWriter      sbtw = new SmallBlockTableWriter(
              POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, documents,root);
        BlockAllocationTableWriter bat  = sbtw.getSBAT();

        // 15 small blocks: 6 for doc340, 0 for doc5000 (too big), 0
View Full Code Here

        documents
            .add(new POIFSDocument("doc9",
                                   new ByteArrayInputStream(new byte[ 9 ])));
       
        HeaderBlock              header = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
        RootProperty               root = new PropertyTable(header).getRoot();
        SmallBlockTableWriter      sbtw = new SmallBlockTableWriter(
              POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, documents,root);
        BlockAllocationTableWriter bat  = sbtw.getSBAT();

        // 15 small blocks: 6 for doc340, 0 for doc5000 (too big), 0
View Full Code Here

    // Fake up a header
    HeaderBlock header_block = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
    header_block.setPropertyStart(0);

    // get property table from the document
    PropertyTable properties = new PropertyTable(header_block, data_blocks);
    RootProperty root = properties.getRoot();
    BlockList bl = SmallBlockTableReader.getSmallDocumentBlocks(
          POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, data_blocks, root, 14);
    assertNotNull(bl);
  }
View Full Code Here

                                       header_block_reader.getXBATCount(),
                                       header_block_reader.getXBATIndex(),
                                       data_blocks);

        // get property table from the document
        PropertyTable properties =
            new PropertyTable(header_block_reader.getBigBlockSize(),
                              header_block_reader.getPropertyStart(),
                              data_blocks);

        // process documents
        processProperties(SmallBlockTableReader
            .getSmallDocumentBlocks(
                  header_block_reader.getBigBlockSize(),
                  data_blocks, properties.getRoot(),
                  header_block_reader.getSBATStart()),
                  data_blocks, properties.getRoot()
                        .getChildren(), new POIFSDocumentPath());
    }
View Full Code Here

    /**
     * Constructor, intended for writing
     */
    public POIFSFileSystem()
    {
        _property_table = new PropertyTable(bigBlockSize);
        _documents      = new ArrayList();
        _root           = null;
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.poifs.property.PropertyTable

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.