public boolean contains(byte[] buffer, int offset, int length) {
      if (startRowInclusive) {
        if (stopRowInclusive) {
          return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) >= 0
            && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY)
              || Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= 0);
        } else {
          return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) >= 0
            && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY)
              || Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < 0);
        }
      } else {
        if (stopRowInclusive) {
          return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) > 0
            && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY)
              || Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) <= 0);
        } else {
          return Bytes.compareTo(buffer, offset, length, startRow, 0, startRow.length) > 0
            && (Bytes.equals(stopRow, HConstants.EMPTY_BYTE_ARRAY)
              || Bytes.compareTo(buffer, offset, length, stopRow, 0, stopRow.length) < 0);
        }
      }
    }
Returns if stop row is inclusive.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java