/** * Writes out any additional property sets */ private void writeAdditionalPropertySets() throws IOException { if (additionalPropertySets == null) { return; } for (Iterator i = additionalPropertySets.iterator(); i.hasNext() ;) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); byte[] data = rps.data; if (data.length > SMALL_BLOCK_THRESHOLD) { int numBlocks = getBigBlocksRequired(data.length); int requiredSize = numBlocks * BIG_BLOCK_SIZE; out.write(data, 0, data.length); byte[] padding = new byte[requiredSize - data.length]; out.write(padding, 0, padding.length); } } }
/** * Writes out any additional property sets */ private void writeAdditionalPropertySets() throws IOException { if (additionalPropertySets == null) { return; } for (Iterator i = additionalPropertySets.iterator(); i.hasNext() ;) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); byte[] data = rps.data; if (data.length > SMALL_BLOCK_THRESHOLD) { int numBlocks = getBigBlocksRequired(data.length); int requiredSize = numBlocks * BIG_BLOCK_SIZE; out.write(data, 0, data.length); byte[] padding = new byte[requiredSize - data.length]; out.write(padding, 0, padding.length); } } }
/** * Writes the block chains for the additional property sets * * @exception IOException */ private void writeAdditionalPropertySetBlockChains() throws IOException { if (additionalPropertySets == null) { return; } int blockNumber = excelDataStartBlock + excelDataBlocks + 16; for (Iterator i = additionalPropertySets.iterator(); i.hasNext() ; ) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); if (rps.data.length > SMALL_BLOCK_THRESHOLD) { int numBlocks = getBigBlocksRequired(rps.data.length); writeBlockChain(blockNumber, numBlocks); blockNumber += numBlocks; } } }
/** * Writes the block chains for the additional property sets * * @exception IOException */ private void writeAdditionalPropertySetBlockChains() throws IOException { if (additionalPropertySets == null) { return; } int blockNumber = excelDataStartBlock + excelDataBlocks + 16; for (Iterator i = additionalPropertySets.iterator(); i.hasNext() ; ) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); if (rps.data.length > SMALL_BLOCK_THRESHOLD) { int numBlocks = getBigBlocksRequired(rps.data.length); writeBlockChain(blockNumber, numBlocks); blockNumber += numBlocks; } } }
numSmallBlockDepotChainBlocks = getBigBlocksRequired(numSmallBlocks * 4); numSmallBlockDepotBlocks = getBigBlocksRequired (numSmallBlocks * SMALL_BLOCK_SIZE); numRootEntryBlocks += getBigBlocksRequired (additionalPropertySets.size() * PROPERTY_STORAGE_BLOCK_SIZE); int blocks = getBigBlocksRequired(l);
numSmallBlockDepotChainBlocks = getBigBlocksRequired(numSmallBlocks * 4); numSmallBlockDepotBlocks = getBigBlocksRequired (numSmallBlocks * SMALL_BLOCK_SIZE); numRootEntryBlocks += getBigBlocksRequired (additionalPropertySets.size() * PROPERTY_STORAGE_BLOCK_SIZE); int blocks = getBigBlocksRequired(l);
int blocks = getBigBlocksRequired(data.length); blocksRequired += blocks;
int blocks = getBigBlocksRequired(data.length); blocksRequired += blocks;
size += getBigBlocksRequired(requiredSize) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(SMALL_BLOCK_THRESHOLD) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(SMALL_BLOCK_THRESHOLD) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(rps.propertyStorage.size) * BIG_BLOCK_SIZE; bigBlock += getBigBlocksRequired(rps.data.length);
size += getBigBlocksRequired(requiredSize) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(SMALL_BLOCK_THRESHOLD) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(SMALL_BLOCK_THRESHOLD) * BIG_BLOCK_SIZE; size += getBigBlocksRequired(rps.propertyStorage.size) * BIG_BLOCK_SIZE; bigBlock += getBigBlocksRequired(rps.data.length);