@Override
  public int encodedLength(String val) {
    // TODO: use of UTF8 here is a leaky abstraction.
    return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2;
  }
Creates a new variable-length {@link String}.
@param order the {@link Order} to use
hbase-common/src/main/java/org/apache/hadoop/hbase/types/OrderedString.java