public static Integer getPartCount ( GetObjectRequest getObjectRequest , AmazonS3 s3 ) { ValidationUtils . assertNotNull ( s3 , "S3 client" ) ; ValidationUtils . assertNotNull ( getObjectRequest , "GetObjectRequest" ) ; GetObjectMetadataRequest getObjectMetadataRequest = RequestCopyUtils . createGetObjectMetadataRequestFrom ( getObjectRequest ) . withPartNumber ( 1 ) ; return s3 . getObjectMetadata ( getObjectMetadataRequest ) . getPartCount ( ) ; }
Returns the part count of the object represented by the getObjectRequest .