private ExtendedCell toOnheapCell(ByteBuffer valAndTagsBuffer, int vOffset,
      int tagsLenSerializationSize) {
      byte[] tagsArray = HConstants.EMPTY_BYTE_ARRAY;
      int tOffset = 0;
      if (this.includeTags) {
        if (this.tagCompressionContext == null) {
          tagsArray = valAndTagsBuffer.array();
          tOffset =
            valAndTagsBuffer.arrayOffset() + vOffset + this.valueLength + tagsLenSerializationSize;
        } else {
          tagsArray = Bytes.copy(tagsBuffer, 0, this.tagsLength);
          tOffset = 0;
        }
      }
      return new OnheapDecodedCell(Bytes.copy(keyBuffer, 0, this.keyLength),
        currentKey.getRowLength(), currentKey.getFamilyOffset(), currentKey.getFamilyLength(),
        currentKey.getQualifierOffset(), currentKey.getQualifierLength(), currentKey.getTimestamp(),
        currentKey.getTypeByte(), valAndTagsBuffer.array(),
        valAndTagsBuffer.arrayOffset() + vOffset, this.valueLength, memstoreTS, tagsArray, tOffset,
        this.tagsLength);
    }
Copy the state from the next one into this instance (the previous state placeholder). Used to
save the previous state when we are advancing the seeker to the next key/value.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java