@Override
  public String decode(PositionedByteRange src) {
    if (Order.ASCENDING == this.order) {
      // avoid unnecessary array copy for ASC case.
      String val =
        Bytes.toString(src.getBytes(), src.getOffset() + src.getPosition(), src.getRemaining());
      src.setPosition(src.getLength());
      return val;
    } else {
      byte[] b = new byte[src.getRemaining()];
      src.get(b);
      order.apply(b, 0, b.length);
      return Bytes.toString(b);
    }
  }
Creates a new {@link DataType} for interacting with values encoded using
{@link Bytes#toBytes(String)}.
@param order the {@link Order} to use
hbase-common/src/main/java/org/apache/hadoop/hbase/types/RawString.java