code: public static Range convert(final String source) {
  
          final Matcher matcher = rangePattern.matcher(source);
  
          if (!matcher.matches()) {
              return new Range();
          }
  
          final String from = matcher.group(1);
          final String to = matcher.group(2);
  
          final long start;
  
          if (from.equals("")) {
              start = 0;
          } else {
              start = parseLong(from);
          }
  
          final long end;
          if (to.equals("")) {
              end = -1;
          } else {
              end = parseLong(to);
          }
  
          return new Range(start, end);
      }
docs: Convert an HTTP Range header to a Range object
  @param source the source
  @return range object