private POIFSFileSystem(boolean newFS) { _header = new HeaderBlock(bigBlockSize); _property_table = new PropertyTable(_header); _mini_store = new POIFSMiniStore(this, _property_table.getRoot(), new ArrayList<>(), _header); _xbat_blocks = new ArrayList<>(); _bat_blocks = new ArrayList<>(); _root = null; if(newFS) { // Data needs to initially hold just the header block, // a single bat block, and an empty properties section _data = new ByteArrayBackedDataSource(IOUtils.safelyAllocate( bigBlockSize.getBigBlockSize()*3, MAX_RECORD_LENGTH)); } }
_header = new HeaderBlock(headerBuffer);
_header = new HeaderBlock(headerBuffer);
/** * Create a single instance initialized with default values */ public HeaderBlockWriter(POIFSBigBlockSize bigBlockSize) { _header_block = new HeaderBlock(bigBlockSize); }
/** * Create a single instance initialized with default values */ public HeaderBlockWriter(POIFSBigBlockSize bigBlockSize) { _header_block = new HeaderBlock(bigBlockSize); }
/** * Constructor, intended for writing */ public POIFSFileSystem() { HeaderBlock header_block = new HeaderBlock(bigBlockSize); _property_table = new PropertyTable(header_block); _documents = new ArrayList(); _root = null; }
/** * Constructor, intended for writing */ public POIFSFileSystem() { HeaderBlock header_block = new HeaderBlock(bigBlockSize); _property_table = new PropertyTable(header_block); _documents = new ArrayList(); _root = null; }
private NPOIFSFileSystem(boolean newFS) { _header = new HeaderBlock(bigBlockSize); _property_table = new NPropertyTable(_header); _mini_store = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<BATBlock>(), _header); _xbat_blocks = new ArrayList<BATBlock>(); _bat_blocks = new ArrayList<BATBlock>(); _root = null; if(newFS) { // Data needs to initially hold just the header block, // a single bat block, and an empty properties section _data = new ByteArrayBackedDataSource(new byte[bigBlockSize.getBigBlockSize()*3]); } }
private NPOIFSFileSystem(boolean newFS) { _header = new HeaderBlock(bigBlockSize); _property_table = new NPropertyTable(_header); _mini_store = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<BATBlock>(), _header); _xbat_blocks = new ArrayList<BATBlock>(); _bat_blocks = new ArrayList<BATBlock>(); _root = null; if(newFS) { // Data needs to initially hold just the header block, // a single bat block, and an empty properties section _data = new ByteArrayBackedDataSource(new byte[bigBlockSize.getBigBlockSize()*3]); } }
_header = new HeaderBlock(headerBuffer);
_header = new HeaderBlock(headerBuffer);
private POIFSFileSystem(boolean newFS) { _header = new HeaderBlock(bigBlockSize); _property_table = new PropertyTable(_header); _mini_store = new POIFSMiniStore(this, _property_table.getRoot(), new ArrayList<>(), _header); _xbat_blocks = new ArrayList<>(); _bat_blocks = new ArrayList<>(); _root = null; if(newFS) { // Data needs to initially hold just the header block, // a single bat block, and an empty properties section _data = new ByteArrayBackedDataSource(IOUtils.safelyAllocate( bigBlockSize.getBigBlockSize()*3, MAX_RECORD_LENGTH)); } }
_header = new HeaderBlock(headerBuffer);
_header = new HeaderBlock(headerBuffer);
/** * Read and process the PropertiesTable (DIR sectors) and the FAT / XFAT blocks (DIFAT sectors), * so that we're ready to work with the file * * @throws IOException if data doesn't start with proper header */ private void readCoreContent() throws IOException { // read CFBF header, it points to everything in the file // Grabs the first sector (512 bytes) // (For 4096 sized blocks, the remaining 3584 bytes are zero, so read them too) // we read the following fields // [00H,08] {0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1}: signature // [1EH,02] size of sectors in power-of-two and stores it in bigBlockSize // [2CH,04] number of SECTs in the FAT chain: _bat_count (_csectFat) // [30H,04] first SECT in the directory chain: _property_start (_sectDirStart) // [3CH,04] first SECT in the MiniFAT chain: _sbat_start (_sectMiniFatStart) // [40H,04] number of SECTs in the MiniFAT chain: _sbat_count (_csectMiniFat) // [44H,04] first SECT in the DIFAT chain: _xbat_start (_sectDifStart) // [48H,04] number of SECTs in the DIFAT chain: _xbat_count (_csectDif) // [4CH,436] the SECTs of first 109 FAT sectors: remaining bytes in header (SECT _sectFat[109]) final HeaderBlock header = new HeaderBlock(is); // Read the FAT blocks difats = new DIFAT(header, is); // We're now able to load steams propertyTable = new PropertyTable(is, header, difats); // Finally read the Small Stream FAT (SBAT or mini-FAT) blocks // also called mini-FAT in CFB specification miniStore = new MiniStore(is, propertyTable.getRoot(), header, difats); }
HeaderBlock header_block = new HeaderBlock(inp); displayHeader(header_block);
HeaderBlock header_block = new HeaderBlock(inp); displayHeader(header_block);
HeaderBlock header_block = new HeaderBlock(stream);
HeaderBlock header_block = new HeaderBlock(stream);
try { header_block = new HeaderBlock(stream); bigBlockSize = header_block.getBigBlockSize();