protected NPOIFSMiniStore(NPOIFSFileSystem filesystem, RootProperty root, List<BATBlock> sbats, HeaderBlock header) { this._filesystem = filesystem; this._sbat_blocks = sbats; this._header = header; this._root = root; this._mini_stream = new NPOIFSStream(filesystem, root.getStartBlock()); }
protected NPOIFSMiniStore(NPOIFSFileSystem filesystem, RootProperty root, List<BATBlock> sbats, HeaderBlock header) { this._filesystem = filesystem; this._sbat_blocks = sbats; this._header = header; this._root = root; this._mini_stream = new NPOIFSStream(filesystem, root.getStartBlock()); }
/** * Constructor for an existing Document */ public NPOIFSDocument(DocumentProperty property, NPOIFSFileSystem filesystem) throws IOException { this._property = property; this._filesystem = filesystem; if(property.getSize() < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) { _stream = new NPOIFSStream(_filesystem.getMiniStore(), property.getStartBlock()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new NPOIFSStream(_filesystem, property.getStartBlock()); _block_size = _filesystem.getBlockStoreBlockSize(); } }
/** * Constructor for an existing Document */ public NPOIFSDocument(DocumentProperty property, NPOIFSFileSystem filesystem) throws IOException { this._property = property; this._filesystem = filesystem; if(property.getSize() < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) { _stream = new NPOIFSStream(_filesystem.getMiniStore(), property.getStartBlock()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new NPOIFSStream(_filesystem, property.getStartBlock()); _block_size = _filesystem.getBlockStoreBlockSize(); } }
_stream = new NPOIFSStream(filesystem.getMiniStore()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new NPOIFSStream(filesystem); _block_size = _filesystem.getBlockStoreBlockSize();
_stream = new NPOIFSStream(filesystem.getMiniStore()); _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize(); } else { _stream = new NPOIFSStream(filesystem); _block_size = _filesystem.getBlockStoreBlockSize();
/** * 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 headerBlock the header block of the file * @param filesystem the filesystem to read from * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public NPropertyTable(final HeaderBlock headerBlock, final NPOIFSFileSystem filesystem) throws IOException { super( headerBlock, buildProperties( (new NPOIFSStream(filesystem, headerBlock.getPropertyStart())).iterator(), headerBlock.getBigBlockSize() ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); }
/** * 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 headerBlock the header block of the file * @param filesystem the filesystem to read from * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public NPropertyTable(final HeaderBlock headerBlock, final NPOIFSFileSystem filesystem) throws IOException { super( headerBlock, buildProperties( (new NPOIFSStream(filesystem, headerBlock.getPropertyStart())).iterator(), headerBlock.getBigBlockSize() ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); }
NPOIFSStream toFree = new NPOIFSStream(blockStore, nextBlock); toFree.free(loopDetector);
NPOIFSStream toFree = new NPOIFSStream(blockStore, nextBlock); toFree.free(loopDetector);
/** * Has our in-memory objects write their state * to their backing blocks */ private void syncWithDataSource() throws IOException { // HeaderBlock HeaderBlockWriter hbw = new HeaderBlockWriter(_header); hbw.writeBlock( getBlockAt(-1) ); // BATs for(BATBlock bat : _bat_blocks) { ByteBuffer block = getBlockAt(bat.getOurBlockIndex()); BlockAllocationTableWriter.writeBlock(bat, block); } // SBATs _mini_store.syncWithDataSource(); // Properties _property_table.write( new NPOIFSStream(this, _header.getPropertyStart()) ); }
/** * Has our in-memory objects write their state * to their backing blocks */ private void syncWithDataSource() throws IOException { // HeaderBlock HeaderBlockWriter hbw = new HeaderBlockWriter(_header); hbw.writeBlock( getBlockAt(-1) ); // BATs for(BATBlock bat : _bat_blocks) { ByteBuffer block = getBlockAt(bat.getOurBlockIndex()); BlockAllocationTableWriter.writeBlock(bat, block); } // SBATs _mini_store.syncWithDataSource(); // Properties _property_table.write( new NPOIFSStream(this, _header.getPropertyStart()) ); }