/** * Constructor for an existing stream. It's up to you * to know how to Get the start block (eg from a * {@link HeaderBlock} or a {@link Property}) */ public NPOIFSStream(BlockStore blockStore, int startBlock) { this.blockStore = blockStore; this.startBlock = startBlock; }
/** * Constructor for a new stream. A start block won't * be allocated until you begin writing to it. */ public NPOIFSStream(BlockStore blockStore) { this.blockStore = blockStore; this.startBlock = POIFSConstants.END_OF_CHAIN; }
public ChainLoopDetector(long rawSize, BlockStore blockStore) { this.blockStore = blockStore; int numBlocks = (int)Math.Ceiling(1.0 * (rawSize / blockStore.GetBlockStoreBlockSize())); used_blocks = new bool[numBlocks]; }