/// <summary> /// fetch the small document block list from an existing file /// </summary> /// <param name="blockList">the raw data from which the small block table will be extracted</param> /// <param name="root">the root property (which contains the start block and small block table size)</param> /// <param name="sbatStart">the start block of the SBAT</param> /// <returns>the small document block list</returns> public static BlockList GetSmallDocumentBlocks(POIFSBigBlockSize bigBlockSize, RawDataBlockList blockList, RootProperty root, int sbatStart) { BlockList list = new SmallDocumentBlockList( SmallDocumentBlock.Extract(bigBlockSize, blockList.FetchBlocks(root.StartBlock, -1))); new BlockAllocationTableReader(bigBlockSize, blockList.FetchBlocks(sbatStart, -1), list); return list; }
/// <summary> /// fetch the small document block list from an existing file /// </summary> /// <param name="bigBlockSize">the poifs bigBlockSize</param> /// <param name="blockList">the raw data from which the small block table will be extracted</param> /// <param name="root">the root property (which contains the start block and small block table size)</param> /// <param name="sbatStart">the start block of the SBAT</param> /// <returns>the small document block list</returns> public static BlockList GetSmallDocumentBlocks(POIFSBigBlockSize bigBlockSize, RawDataBlockList blockList, RootProperty root, int sbatStart) { BlockList list = new SmallDocumentBlockList( SmallDocumentBlock.Extract(bigBlockSize, blockList.FetchBlocks(root.StartBlock, -1))); new BlockAllocationTableReader(bigBlockSize, blockList.FetchBlocks(sbatStart, -1), list); return(list); }
/** * reading constructor (used when we've read in a file and we want * to extract the property table from it). Populates the * properties thoroughly * * @param startBlock the first block of the property table * @param blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(HeaderBlock headerBlock, RawDataBlockList blockList) : base(headerBlock, PropertyFactory.ConvertToProperties( blockList.FetchBlocks(headerBlock.PropertyStart, -1) ) ) { _bigBigBlockSize = headerBlock.BigBlockSize; _blocks = null; }
private static BlockAllocationTableReader prepareReader( POIFSBigBlockSize bigBlockSize, RawDataBlockList blockList, BlockList list, RootProperty root, int sbatStart) { // Process the SBAT and blocks return(new BlockAllocationTableReader(bigBlockSize, blockList.FetchBlocks(sbatStart, -1), list)); }
/** * reading constructor (used when we've read in a file and we want * to extract the property table from it). Populates the * properties thoroughly * * @param startBlock the first block of the property table * @param blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(int startBlock, RawDataBlockList blockList) { _start_block = POIFSConstants.END_OF_CHAIN; _blocks = null; _properties = PropertyFactory .ConvertToProperties(blockList.FetchBlocks(startBlock,-1)); PopulatePropertyTree(( DirectoryProperty ) _properties[0]); }
private static BlockList prepareSmallDocumentBlocks( POIFSBigBlockSize bigBlockSize, RawDataBlockList blockList, RootProperty root, int sbatStart) { // Fetch the blocks which hold the Small Blocks stream ListManagedBlock[] smallBlockBlocks = blockList.FetchBlocks(root.StartBlock, -1); // Turn that into a list BlockList list = new SmallDocumentBlockList( SmallDocumentBlock.Extract(bigBlockSize, smallBlockBlocks)); return(list); }