code: public static Long getContentLengthFromContentRange(ObjectMetadata metadata) {
          ValidationUtils.assertNotNull(metadata, "Object metadata");
  
          String contentRange = (String) metadata.getRawMetadataValue(Headers.CONTENT_RANGE);
  
          if (contentRange != null) {
              try {
                  String[] tokens = contentRange.split("[ -/]+");
                  return Long.parseLong(tokens[3]);
              } catch (Exception e) {
                  log.info(String.format("Error parsing 'Content-Range' header value: %s. So returning "
                                         + "null value for content length", contentRange), e);
              }
          }
  
          return null;
      }
docs: Returns the content length of the object if response contains the Content-Range header
  and is well formed.
  
  If the Content-Range header is missing or header is malformed or content length is missing in the header value,
  then a null value is returned.
  <b>Note: If there is exception parsing the value, the exception is logged and a null value is returned.</b>
  
  For example,
  Retuns 1234, if Content-Range value is bytes 42-1233/1234
  Retuns null, if Content-Range value is missing
  Retuns null, if Content-Range value is not well formed bytes 42-1233/*