/** * Get the start block for the property table * * @return start block index */ public int getStartBlock() { return _header_block.getPropertyStart(); }
/** * 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 PropertyTable(final HeaderBlock headerBlock, final POIFSFileSystem filesystem) throws IOException { this( headerBlock, new POIFSStream(filesystem, headerBlock.getPropertyStart()) ); }
dump(fs, header.getPropertyStart(), "properties", file);
POIFSStream propStream = new POIFSStream(this, _header.getPropertyStart()); _property_table.preWrite(); _property_table.write(propStream);
/** * Get the start block for the property table * * @return start block index */ public int getStartBlock() { return _header_block.getPropertyStart(); }
/** * Get the start block for the property table * * @return start block index */ public int getStartBlock() { return _header_block.getPropertyStart(); }
/** * Get the start block for the property table * * @return start block index */ public int getStartBlock() { return _header_block.getPropertyStart(); }
/** * 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 PropertyTable(final HeaderBlock headerBlock, final POIFSFileSystem filesystem) throws IOException { this( headerBlock, new POIFSStream(filesystem, headerBlock.getPropertyStart()) ); }
public static void displayHeader(HeaderBlock header_block) throws Exception { System.out.println("Header Details:"); System.out.println(" Block size: " + header_block.getBigBlockSize().getBigBlockSize()); System.out.println(" BAT (FAT) header blocks: " + header_block.getBATArray().length); System.out.println(" BAT (FAT) block count: " + header_block.getBATCount()); System.out.println(" XBAT (FAT) block count: " + header_block.getXBATCount()); System.out.println(" XBAT (FAT) block 1 at: " + header_block.getXBATIndex()); System.out.println(" SBAT (MiniFAT) block count: " + header_block.getSBATCount()); System.out.println(" SBAT (MiniFAT) block 1 at: " + header_block.getSBATStart()); System.out.println(" Property table at: " + header_block.getPropertyStart()); System.out.println(""); }
public static void displayHeader(HeaderBlock header_block) throws Exception { System.out.println("Header Details:"); System.out.println(" Block size: " + header_block.getBigBlockSize().getBigBlockSize()); System.out.println(" BAT (FAT) header blocks: " + header_block.getBATArray().length); System.out.println(" BAT (FAT) block count: " + header_block.getBATCount()); System.out.println(" XBAT (FAT) block count: " + header_block.getXBATCount()); System.out.println(" XBAT (FAT) block 1 at: " + header_block.getXBATIndex()); System.out.println(" SBAT (MiniFAT) block count: " + header_block.getSBATCount()); System.out.println(" SBAT (MiniFAT) block 1 at: " + header_block.getSBATStart()); System.out.println(" Property table at: " + header_block.getPropertyStart()); System.out.println(""); }
dump(fs, header.getPropertyStart(), "properties", file);
/** * 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 blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(final HeaderBlock headerBlock, final RawDataBlockList blockList) throws IOException { super( headerBlock, PropertyFactory.convertToProperties( blockList.fetchBlocks(headerBlock.getPropertyStart(), -1) ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); _blocks = null; }
/** * 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 blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(final HeaderBlock headerBlock, final RawDataBlockList blockList) throws IOException { super( headerBlock, PropertyFactory.convertToProperties( blockList.fetchBlocks(headerBlock.getPropertyStart(), -1) ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); _blocks = null; }
public PropertyTable(final XlsInputStream is, HeaderBlock header, BlockStore blockStore) { this.is = is; this.sectorSize = header.getBigBlockSize().getBigBlockSize(); // Directory sectors are stored as a chain starting from sector # header.propertyStart // and FAT table contains link to next sector in the chain int nextBlock = header.getPropertyStart(); // first sector in directory chain while (nextBlock != POIFSConstants.END_OF_CHAIN) { int blockOffset = blockStore.getBlockOffset(nextBlock); processSector(blockOffset); nextBlock = blockStore.getNextBlock(nextBlock); // get next block in the chain } populatePropertyTree((DirectoryProperty) properties.get(0)); }
/** * 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(); }
POIFSStream propStream = new POIFSStream(this, _header.getPropertyStart()); _property_table.preWrite(); _property_table.write(propStream);
/** * 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()) ); }
properties.getRoot().getChildren(), null, header_block.getPropertyStart() );