public static short decodeInt16(PositionedByteRange src) {
    final byte header = src.get();
    assert header == FIXED_INT16 || header == DESCENDING.apply(FIXED_INT16);
    Order ord = header == FIXED_INT16 ? ASCENDING : DESCENDING;
    short val = (short) ((ord.apply(src.get()) ^ 0x80) & 0xff);
    val = (short) ((val << 8) + (ord.apply(src.get()) & 0xff));
    return val;
  }
Decode an {@code int16} value.
@see #encodeInt16(PositionedByteRange, short, Order)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java