public static int decodeInt32(PositionedByteRange src) {
    final byte header = src.get();
    assert header == FIXED_INT32 || header == DESCENDING.apply(FIXED_INT32);
    Order ord = header == FIXED_INT32 ? ASCENDING : DESCENDING;
    int val = (ord.apply(src.get()) ^ 0x80) & 0xff;
    for (int i = 1; i < 4; i++) {
      val = (val << 8) + (ord.apply(src.get()) & 0xff);
    }
    return val;
  }
Decode an {@code int32} value.
@see #encodeInt32(PositionedByteRange, int, Order)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java