code: protected void processRange(Long[] range) {
  		String rangeStr = request.getHeader("Range");
  		int index = rangeStr.indexOf(',');
  		if (index != -1)
  			rangeStr = rangeStr.substring(0, index);
  		rangeStr = rangeStr.replace("bytes=", "");
  		
  		String[] arr = rangeStr.split("-", 2);
  		if (arr.length < 2)
  			throw new RuntimeException("Range error");
  		
  		long fileLength = file.length();
  		for (int i=0; i<range.length; i++) {
  			if (StrKit.notBlank(arr[i])) {
  				range[i] = Long.parseLong(arr[i].trim());
  				if (range[i] >= fileLength)
  					range[i] = fileLength - 1;
  			}
  		}
  		
  		// Range format like: 9500-
  		if (range[0] != null && range[1] == null) {
  			range[1] = fileLength - 1;
  		}
  		// Range format like: -500
  		else if (range[0] == null && range[1] != null) {
  			range[0] = fileLength - range[1];
  			range[1] = fileLength - 1;
  		}
  		
  		// check final range
  		if (range[0] == null || range[1] == null || range[0].longValue() > range[1].longValue())
  			throw new RuntimeException("Range error");
  	}
docs: Examples of byte-ranges-specifier values (assuming an entity-body of length 10000):
  The first 500 bytes (byte offsets 0-499, inclusive): bytes=0-499
  The second 500 bytes (byte offsets 500-999, inclusive): bytes=500-999
  The final 500 bytes (byte offsets 9500-9999, inclusive): bytes=-500
  Or bytes=9500-