@Override
  public T decode(PositionedByteRange src) {
    if (wrapped.isSkippable()) {
      T ret = wrapped.decode(src);
      src.setPosition(src.getPosition() + term.length);
      return ret;
    } else {
      // find the terminator position
      int term = terminatorPosition(src);
      if (-1 == term) {
        throw new IllegalArgumentException("Terminator sequence not found.");
      }
      byte[] b = new byte[term - src.getPosition()];
      src.get(b);
      // TODO: should we assert that b.position == b.length?
      T ret = wrapped.decode(new SimplePositionedMutableByteRange(b));
      src.get(this.term);
      return ret;
    }
  }
Skip {@code src}'s position forward over one encoded value.
@param src the buffer containing the encoded value.
@return number of bytes skipped.
@throws IllegalArgumentException when the terminator sequence is not found.
hbase-common/src/main/java/org/apache/hadoop/hbase/types/TerminatedWrapper.java