@Override
  public short getShort(int index) {
    int offset = this.offset + index;
    short n = 0;
    n = (short) ((n ^ bytes[offset]) & 0xFF);
    n = (short) (n << 8);
    n = (short) ((n ^ bytes[offset + 1]) & 0xFF);
    return n;
  }
Returns true when {@code range} is of zero length, false otherwise.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractByteRange.java