private ByteBuff getEncodedBuffer(HFileBlock newBlock) {
      ByteBuff origBlock = newBlock.getBufferReadOnly();
      int pos = newBlock.headerSize() + DataBlockEncoding.ID_SIZE;
      origBlock.position(pos);
      origBlock
        .limit(pos + newBlock.getUncompressedSizeWithoutHeader() - DataBlockEncoding.ID_SIZE);
      return origBlock.slice();
    }
Updates the current block to be the given {@link HFileBlock}. Seeks to the the first
key/value pair.
@param newBlock the block to make current, and 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