/** * Writes out all the data in the small block depot * * @exception */ private void writeSmallBlockDepot() throws IOException { if (additionalPropertySets == null) { return; } byte[] smallBlockDepot = new byte[numSmallBlockDepotBlocks * BIG_BLOCK_SIZE]; int pos = 0; for (Iterator i = additionalPropertySets.iterator() ; i.hasNext() ; ) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); if (rps.data.length <= SMALL_BLOCK_THRESHOLD) { int smallBlocks = getSmallBlocksRequired(rps.data.length); int length = smallBlocks * SMALL_BLOCK_SIZE; System.arraycopy(rps.data, 0, smallBlockDepot, pos, rps.data.length); pos += length; } } out.write(smallBlockDepot); }
/** * Writes out all the data in the small block depot * * @exception */ private void writeSmallBlockDepot() throws IOException { if (additionalPropertySets == null) { return; } byte[] smallBlockDepot = new byte[numSmallBlockDepotBlocks * BIG_BLOCK_SIZE]; int pos = 0; for (Iterator i = additionalPropertySets.iterator() ; i.hasNext() ; ) { ReadPropertyStorage rps = (ReadPropertyStorage) i.next(); if (rps.data.length <= SMALL_BLOCK_THRESHOLD) { int smallBlocks = getSmallBlocksRequired(rps.data.length); int length = smallBlocks * SMALL_BLOCK_SIZE; System.arraycopy(rps.data, 0, smallBlockDepot, pos, rps.data.length); pos += length; } } out.write(smallBlockDepot); }
rps.data.length != 0) int numSmallBlocks = getSmallBlocksRequired(rps.data.length); for (int j = 0 ; j < numSmallBlocks - 1 ; j++)
rps.data.length != 0) int numSmallBlocks = getSmallBlocksRequired(rps.data.length); for (int j = 0 ; j < numSmallBlocks - 1 ; j++)
int blocks = getSmallBlocksRequired(data.length); numSmallBlocks += blocks;
int blocks = getSmallBlocksRequired(data.length); numSmallBlocks += blocks;
size += getSmallBlocksRequired(rps.propertyStorage.size) * SMALL_BLOCK_SIZE; smallBlock += getSmallBlocksRequired(rps.data.length);
size += getSmallBlocksRequired(rps.propertyStorage.size) * SMALL_BLOCK_SIZE; smallBlock += getSmallBlocksRequired(rps.data.length);