protected BloomFilter readBloomFilter() throws IOException {
  final long addr=checkpoint.addrBloom;
  if (addr == 0L) {
    return null;
  }
  if (storeCache != null) {
    final BloomFilter bloomFilter=(BloomFilter)storeCache.get(addr);
    if (bloomFilter != null) {
      return bloomFilter;
    }
  }
  if (log.isInfoEnabled())   log.info("reading bloom filter: " + addressManager.toString(addr));
  final long off=addressManager.getOffset(addr);
  final int len=addressManager.getByteCount(addr);
  final ByteBuffer buf=ByteBuffer.allocate(len);
  buf.limit(len);
  buf.position(0);
  try {
    FileChannelUtility.readAll(opener,buf,off);
    buf.flip();
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
  assert buf.position() == 0;
  assert buf.limit() == len;
  final BloomFilter bloomFilter=(BloomFilter)SerializerUtil.deserialize(buf);
  if (log.isInfoEnabled())   log.info("Read bloom filter: bytesOnDisk=" + len);
  if (storeCache != null) {
    storeCache.putIfAbsent(addr,bloomFilter);
  }
  return bloomFilter;
}

protected BloomFilter readBloomFilter ( ) throws IOException { final long addr = checkpoint . addrBloom ; if ( addr == 0L ) { return null ; } if ( storeCache != null ) { final BloomFilter bloomFilter = ( BloomFilter ) storeCache . get ( addr ) ; if ( bloomFilter != null ) { return bloomFilter ; } } if ( log . isInfoEnabled ( ) ) log . info ( "reading bloom filter: " + addressManager . toString ( addr ) ) ; final long off = addressManager . getOffset ( addr ) ; final int len = addressManager . getByteCount ( addr ) ; final ByteBuffer buf = ByteBuffer . allocate ( len ) ; buf . limit ( len ) ; buf . position ( 0 ) ; try { FileChannelUtility . readAll ( opener , buf , off ) ; buf . flip ( ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } assert buf . position ( ) == 0 ; assert buf . limit ( ) == len ; final BloomFilter bloomFilter = ( BloomFilter ) SerializerUtil . deserialize ( buf ) ; if ( log . isInfoEnabled ( ) ) log . info ( "Read bloom filter: bytesOnDisk=" + len ) ; if ( storeCache != null ) { storeCache . putIfAbsent ( addr , bloomFilter ) ; } return bloomFilter ; }
reads the bloom filter directly from the file .
