@Override
    public HFileBlock deserialize(ByteBuff buf, ByteBuffAllocator alloc) throws IOException {
      // The buf has the file block followed by block metadata.
      // Set limit to just before the BLOCK_METADATA_SPACE then rewind.
      buf.limit(buf.limit() - BLOCK_METADATA_SPACE).rewind();
      // Get a new buffer to pass the HFileBlock for it to 'own'.
      ByteBuff newByteBuff = buf.slice();
      // Read out the BLOCK_METADATA_SPACE content and shove into our HFileBlock.
      buf.position(buf.limit());
      buf.limit(buf.limit() + HFileBlock.BLOCK_METADATA_SPACE);
      boolean usesChecksum = buf.get() == (byte) 1;
      long offset = buf.getLong();
      int nextBlockOnDiskSize = buf.getInt();
      return createFromBuff(newByteBuff, usesChecksum, offset, nextBlockOnDiskSize, null, alloc);
    }
Used deserializing blocks from Cache. <code>
++++++++++++++
+ HFileBlock +
++++++++++++++
+ Checksums  + <= Optional
++++++++++++++
+ Metadata!  + <= See note on BLOCK_METADATA_SPACE above.
++++++++++++++
</code>
@see #serialize(ByteBuffer, boolean)
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java