protected ExtendedCell getFirstKeyCellInBlock(HFileBlock curBlock) {
      ByteBuff buffer = curBlock.getBufferWithoutHeader();
      // It is safe to manipulate this buffer because we own the buffer object.
      buffer.rewind();
      int klen = buffer.getInt();
      buffer.skip(Bytes.SIZEOF_INT);// Skip value len part
      ByteBuffer keyBuff = buffer.asSubByteBuffer(klen);
      if (keyBuff.hasArray()) {
        return new KeyValue.KeyOnlyKeyValue(keyBuff.array(),
          keyBuff.arrayOffset() + keyBuff.position(), klen);
      } else {
        return new ByteBufferKeyOnlyKeyValue(keyBuff, keyBuff.position(), klen);
      }
    }
Updates the current block to be the given {@link HFileBlock}. Seeks to the the first
key/value pair.
@param newBlock the block read by {@link HFileReaderImpl#readBlock}, it's a totally new block
                with new allocated {@link ByteBuff}, so if no further reference to this
                block, we should release it carefully.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java