private void writeInlineBlocks(HFileBlock.Writer hbw, FSDataOutputStream outputStream,
    HFileBlockIndex.BlockIndexWriter biw, boolean isClosing) throws IOException {
    while (biw.shouldWriteBlock(isClosing)) {
      long offset = outputStream.getPos();
      biw.writeInlineBlock(hbw.startWriting(biw.getInlineBlockType()));
      hbw.writeHeaderAndData(outputStream);
      biw.blockWritten(offset, hbw.getOnDiskSizeWithHeader(),
        hbw.getUncompressedSizeWithoutHeader());
      LOG.info(
        "Wrote an inline index block at " + offset + ", size " + hbw.getOnDiskSizeWithHeader());
    }
  }
A wrapper around a block reader which only caches the results of the last operation. Not
thread-safe.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java