private void allocateNewChunk() { if (prevChunk == null) { // First chunk chunk = BloomFilterUtil.createBySize(chunkByteSize, errorRate, hashType, maxFold, bloomType); } else { // Use the same parameters as the last chunk, but a new array and // a zero key count. chunk = prevChunk.createAnother(); } if (chunk.getKeyCount() != 0) { throw new IllegalStateException("keyCount=" + chunk.getKeyCount() + " > 0"); } chunk.allocBloom(); ++numChunks; } @Override