code: public static long[][] parseRanges(String rangeValue) {
  		if (!rangeValue.startsWith("bytes=")) return null;
  		int s = "bytes=".length();
  		int pcomma = rangeValue.indexOf(',', s);
  		if (pcomma < 0) {
  			long[] range = parseRange(rangeValue.substring(s));
  			return range != null ? new long[][] { range } : null;
  		}
  		int e = rangeValue.length();
  		List<long[]> ranges = new ArrayList<long[]>();
  		while (true) {
  			long[] range = parseRange(rangeValue.substring(s, pcomma));
  			// TODO: too strict? fails on double comma.
  			if (range == null) return null;
  			ranges.add(range);
  			if ((s = pcomma + 1) >= e) break;
  			pcomma = rangeValue.indexOf(',', s);
  			if (pcomma < 0) pcomma = e;
  		}
  		return ranges.toArray(new long[ranges.size()][]);
  	}
docs: Parse {@code Range} header field value.
  Only {@code bytes} unit is supported.
  @param rangeValue {@code Range} header field value.
  @return an array of long[2], or {@code null} if invalid.