当前位置: 首页>>代码示例>>C#>>正文


C# POIFSBigBlockSize.GetXBATEntriesPerBlock方法代码示例

本文整理汇总了C#中NPOI.POIFS.Common.POIFSBigBlockSize.GetXBATEntriesPerBlock方法的典型用法代码示例。如果您正苦于以下问题:C# POIFSBigBlockSize.GetXBATEntriesPerBlock方法的具体用法?C# POIFSBigBlockSize.GetXBATEntriesPerBlock怎么用?C# POIFSBigBlockSize.GetXBATEntriesPerBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NPOI.POIFS.Common.POIFSBigBlockSize的用法示例。


在下文中一共展示了POIFSBigBlockSize.GetXBATEntriesPerBlock方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetXBATChain

 private void SetXBATChain(POIFSBigBlockSize bigBlockSize, int chainIndex)
 {
     int _entries_per_xbat_block = bigBlockSize.GetXBATEntriesPerBlock();
     _values[_entries_per_xbat_block] = chainIndex;
 }
开发者ID:xoposhiy,项目名称:npoi,代码行数:5,代码来源:BATBlock.cs

示例2: ReadCoreContents

        /**
         * Read and process the PropertiesTable and the
         *  FAT / XFAT blocks, so that we're Ready to
         *  work with the file
         */
        private void ReadCoreContents()
        {
            // Grab the block size
            bigBlockSize = _header.BigBlockSize;

            // Each block should only ever be used by one of the
            //  FAT, XFAT or Property Table. Ensure it does
            ChainLoopDetector loopDetector = GetChainLoopDetector();

            // Read the FAT blocks
            foreach (int fatAt in _header.BATArray)
            {
                ReadBAT(fatAt, loopDetector);
            }

            // Now read the XFAT blocks, and the FATs within them
            BATBlock xfat;
            int nextAt = _header.XBATIndex;
            for (int i = 0; i < _header.XBATCount; i++)
            {
                loopDetector.Claim(nextAt);
                ByteBuffer fatData = GetBlockAt(nextAt);
                xfat = BATBlock.CreateBATBlock(bigBlockSize, fatData);
                xfat.OurBlockIndex = nextAt;
                nextAt = xfat.GetValueAt(bigBlockSize.GetXBATEntriesPerBlock());
                _xbat_blocks.Add(xfat);

                for (int j = 0; j < bigBlockSize.GetXBATEntriesPerBlock(); j++)
                {
                    int fatAt = xfat.GetValueAt(j);
                    if (fatAt == POIFSConstants.UNUSED_BLOCK || fatAt == POIFSConstants.END_OF_CHAIN) break;
                    ReadBAT(fatAt, loopDetector);
                }
            }

            // We're now able to load steams
            // Use this to read in the properties
            _property_table = new NPropertyTable(_header, this);

            // Finally read the Small Stream FAT (SBAT) blocks
            BATBlock sfat;
            List<BATBlock> sbats = new List<BATBlock>();
            _mini_store = new NPOIFSMiniStore(this, _property_table.Root, sbats, _header);
            nextAt = _header.SBATStart;
            for (int i = 0; i < _header.SBATCount; i++)
            {
                loopDetector.Claim(nextAt);
                ByteBuffer fatData = GetBlockAt(nextAt);
                sfat = BATBlock.CreateBATBlock(bigBlockSize, fatData);
                sfat.OurBlockIndex = nextAt;
                sbats.Add(sfat);
                nextAt = GetNextBlock(nextAt);
            }
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:59,代码来源:NPOIFSFileSystem.cs

示例3: CalculateXBATStorageRequirements

        public static int CalculateXBATStorageRequirements(POIFSBigBlockSize bigBlockSize, int entryCount)
        {
            int _entries_per_xbat_block = bigBlockSize.GetXBATEntriesPerBlock();

            return (entryCount + _entries_per_xbat_block - 1) / _entries_per_xbat_block;
        }
开发者ID:xoposhiy,项目名称:npoi,代码行数:6,代码来源:BATBlock.cs


注:本文中的NPOI.POIFS.Common.POIFSBigBlockSize.GetXBATEntriesPerBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。