@Override
    public void setCurrentBuffer(ByteBuff buffer) {
      if (this.tagCompressionContext != null) {
        this.tagCompressionContext.clear();

        // Prior seekToKeyInBlock may have reset this to false if we fell back to previous
        // seeker state. This is an optimization so we don't have to uncompress tags again when
        // reading last state.
        // In seekBefore flow, if block change happens then rewind is not called and
        // setCurrentBuffer is called, so need to uncompress any tags we see.
        current.uncompressTags = true;
      }
      currentBuffer = buffer;
      current.currentBuffer = currentBuffer;
      if (tagCompressionContext != null) {
        current.tagCompressionContext = tagCompressionContext;
      }
      decodeFirst();
      current.setKey(current.keyBuffer, current.memstoreTS);
      previous.invalidate();
    }
Copies only the key part of the keybuffer by doing a deep copy and passes the seeker state
members for taking a clone. Note that the value byte[] part is still pointing to the
currentBuffer and represented by the valueOffset and valueLength
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java