private void expectState(State expectedState) {
      if (state != expectedState) {
        throw new IllegalStateException(
          "Expected state: " + expectedState + ", actual state: " + state);
      }
    }
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