public static ArrayList<ByteRange> fromArrays(Collection<byte[]> arrays) {
    if (arrays == null) {
      return new ArrayList<>(0);
    }
    ArrayList<ByteRange> ranges = Lists.newArrayListWithCapacity(arrays.size());
    for (byte[] array : arrays) {
      ranges.add(new SimpleMutableByteRange(array));
    }
    return ranges;
  }
Utility methods for working with {@link ByteRange}.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java