public int encode(PositionedByteRange dst, byte[] val, int voff, int vlen) {
    Bytes.putBytes(dst.getBytes(), dst.getOffset() + dst.getPosition(), val, voff, vlen);
    dst.setPosition(dst.getPosition() + vlen);
    return vlen;
  }
Write {@code val} into {@code dst}, respecting {@code voff} and {@code vlen}.
@param dst  the {@link PositionedByteRange} to write to
@param val  the value to write to {@code dst}
@param voff the offset in {@code dst} where to write {@code val} to
@param vlen the length of {@code val}
@return number of bytes written
hbase-common/src/main/java/org/apache/hadoop/hbase/types/RawBytes.java