code: public long getContentLength() {
          Long contentLength = (Long)metadata.get(Headers.CONTENT_LENGTH);
  
          if (contentLength == null) return 0;
          return contentLength.longValue();
      }
docs: <p>
  Gets the Content-Length HTTP header indicating the size of the
  associated object in bytes.
  </p>
  <p>
  This field is required when uploading objects to S3, but the AWS S3 Java
  client will automatically set it when working directly with files. When
  uploading directly from a stream, set this field if
  possible. Otherwise the client must buffer the entire stream in
  order to calculate the content length before sending the data to
  Amazon S3.
  </p>
  <p>
  For more information on the Content-Length HTTP header, see <a
  href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13</a>
  </p>
  
  @return The Content-Length HTTP header indicating the size of the
  associated object in bytes. Returns <code>null</code>
  if it hasn't been set yet.
  
  @see ObjectMetadata#setContentLength(long)