private ByteBuff cloneOnDiskBufferWithHeader() {
      expectState(State.BLOCK_READY);
      ByteBuff bytebuff = allocator.allocate(onDiskBlockBytesWithHeader.size());
      onDiskBlockBytesWithHeader.toByteBuff(bytebuff);
      bytebuff.rewind();
      return bytebuff;
    }
Clones the header followed by the on-disk (compressed/encoded/encrypted) data. This is needed
for storing packed blocks in the block cache. Returns only the header and data, Does not
include checksum data.
@return Returns a copy of block bytes for caching on write
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java