@Override
  public byte[] toByteArray() {
    FilterProtos.MultiRowRangeFilter.Builder builder =
      FilterProtos.MultiRowRangeFilter.newBuilder();
    for (RowRange range : rangeList) {
      if (range != null) {
        FilterProtos.RowRange.Builder rangebuilder = FilterProtos.RowRange.newBuilder();
        if (range.startRow != null)
          rangebuilder.setStartRow(UnsafeByteOperations.unsafeWrap(range.startRow));
        rangebuilder.setStartRowInclusive(range.startRowInclusive);
        if (range.stopRow != null)
          rangebuilder.setStopRow(UnsafeByteOperations.unsafeWrap(range.stopRow));
        rangebuilder.setStopRowInclusive(range.stopRowInclusive);
        builder.addRowRangeList(rangebuilder.build());
      }
    }
    return builder.build().toByteArray();
  }
Returns The filter serialized using pb
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java