public long getInstanceLength ( ) { // See Content-Range in // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html String contentRange = ( String ) metadata . get ( Headers . CONTENT_RANGE ) ; if ( contentRange != null ) { int pos = contentRange . lastIndexOf ( "/" ) ; if ( pos >= 0 ) return Long . parseLong ( contentRange . substring ( pos + 1 ) ) ; } return getContentLength ( ) ; }
Returns the physical length of the entire object stored in S3 . This is useful during for example a range get operation .