code: public static long getDownContentSize(HttpHeaders resHeaders) {
      String contentRange = resHeaders.get(HttpHeaderNames.CONTENT_RANGE);
      if (contentRange != null) {
        Pattern pattern = Pattern.compile("^[^\\d]*(\\d+)-(\\d+)/.*$");
        Matcher matcher = pattern.matcher(contentRange);
        if (matcher.find()) {
          long startSize = Long.parseLong(matcher.group(1));
          long endSize = Long.parseLong(matcher.group(2));
          return endSize - startSize + 1;
        }
      } else {
        String contentLength = resHeaders.get(HttpHeaderNames.CONTENT_LENGTH);
        if (contentLength != null) {
          return Long.valueOf(resHeaders.get(HttpHeaderNames.CONTENT_LENGTH));
        }
      }
      return 0;
    }
docs: 取当前请求的ContentLength