Examples of HeaderBlock


Examples of org.apache.poi.poifs.storage.HeaderBlock

   * extracted from a file known to be acceptable to Excel.
   */
  public void testWriterPropertyTable() throws IOException {

    // create the PropertyTable
     HeaderBlock   headerBlock = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
    PropertyTable table = new PropertyTable(headerBlock);

    // create three DocumentProperty instances and add them to the
    // PropertyTable
    DocumentProperty workbook = new DocumentProperty("Workbook", 0x00046777);
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

    // table
    new BlockAllocationTableReader(
          POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 1, bat_array, 0, -2, data_blocks);

      // 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 table = new PropertyTable(header_block, data_blocks);

    assertEquals(30 * 64, table.getRoot().getSize());
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

    /**
     * Constructor, intended for writing
     */
    public NPOIFSFileSystem()
    {
        _header         = new HeaderBlock(bigBlockSize);
        _property_table = new NPropertyTable(_header);
        _mini_store     = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<BATBlock>(), _header);
        _xbat_blocks     = new ArrayList<BATBlock>();
        _bat_blocks     = new ArrayList<BATBlock>();
        _root           = null;
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

          // Get the header
          ByteBuffer headerBuffer = ByteBuffer.allocate(POIFSConstants.SMALLER_BIG_BLOCK_SIZE);
          IOUtils.readFully(channel, headerBuffer);
         
          // Have the header processed
          _header = new HeaderBlock(headerBuffer);
         
          // Now process the various entries
          _data = new FileBackedDataSource(channel);
          readCoreContents();
       } catch(IOException e) {
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

           // Get the header
           ByteBuffer headerBuffer = ByteBuffer.allocate(POIFSConstants.SMALLER_BIG_BLOCK_SIZE);
           IOUtils.readFully(channel, headerBuffer);
          
           // Have the header processed
           _header = new HeaderBlock(headerBuffer);
          
           // Sanity check the block count
           BlockAllocationTableReader.sanityCheckBlockCount(_header.getBATCount());
  
           // We need to buffer the whole file into memory when
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

    private POIFSBigBlockSize bigBlockSize =
       POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS;

    private NPOIFSFileSystem(boolean newFS)
    {
        _header         = new HeaderBlock(bigBlockSize);
        _property_table = new NPropertyTable(_header);
        _mini_store     = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<BATBlock>(), _header);
        _xbat_blocks    = new ArrayList<BATBlock>();
        _bat_blocks     = new ArrayList<BATBlock>();
        _root           = null;
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

          // Get the header
          ByteBuffer headerBuffer = ByteBuffer.allocate(POIFSConstants.SMALLER_BIG_BLOCK_SIZE);
          IOUtils.readFully(channel, headerBuffer);
         
          // Have the header processed
          _header = new HeaderBlock(headerBuffer);
         
          // Now process the various entries
          _data = new FileBackedDataSource(channel);
          readCoreContents();
       } catch(IOException e) {
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

           // Get the header
           ByteBuffer headerBuffer = ByteBuffer.allocate(POIFSConstants.SMALLER_BIG_BLOCK_SIZE);
           IOUtils.readFully(channel, headerBuffer);
          
           // Have the header processed
           _header = new HeaderBlock(headerBuffer);
          
           // Sanity check the block count
           BlockAllocationTableReader.sanityCheckBlockCount(_header.getBATCount());
  
           // We need to buffer the whole file into memory when
View Full Code Here

Examples of org.apache.poi.poifs.storage.HeaderBlock

        throws IOException
    {
        registryClosed = true;

        // read the header block from the stream
        HeaderBlock header_block = new HeaderBlock(stream);

        // read the rest of the stream into blocks
        RawDataBlockList data_blocks = new RawDataBlockList(stream, header_block.getBigBlockSize());

        // set up the block allocation table (necessary for the
        // data_blocks to be manageable
        new BlockAllocationTableReader(header_block.getBigBlockSize(),
                                       header_block.getBATCount(),
                                       header_block.getBATArray(),
                                       header_block.getXBATCount(),
                                       header_block.getXBATIndex(),
                                       data_blocks);

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

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

Examples of org.apache.poi.poifs.storage.HeaderBlock

    /**
     * Constructor, intended for writing
     */
    public POIFSFileSystem()
    {
        HeaderBlock header_block = new HeaderBlock(bigBlockSize);
        _property_table = new PropertyTable(header_block);
        _documents      = new ArrayList();
        _root           = null;
    }
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.