@Override
  public int encodedLength(Number val) {
    // TODO: this could be done better.
    PositionedByteRange buff = new SimplePositionedMutableByteRange(100);
    return encode(buff, val);
  }
Creates a new {@link Number} of arbitrary precision and variable-length encoding.
@param order the {@link Order} to use
hbase-common/src/main/java/org/apache/hadoop/hbase/types/OrderedNumeric.java