@SdkInternalApi
    public static long getPartSize(GetObjectRequest getObjectRequest, AmazonS3 s3, int partNumber) {
        ValidationUtils.assertNotNull(s3, "S3 client");
        ValidationUtils.assertNotNull(getObjectRequest, "GetObjectRequest");

        GetObjectMetadataRequest getObjectMetadataRequest = RequestCopyUtils.createGetObjectMetadataRequestFrom(getObjectRequest)
                                                                            .withPartNumber(partNumber);

        return s3.getObjectMetadata(getObjectMetadataRequest).getContentLength();
    }
@ SdkInternalApi public static long getPartSize ( GetObjectRequest getObjectRequest , AmazonS3 s3 , int partNumber ) { ValidationUtils . assertNotNull ( s3 , "S3 client" ) ; ValidationUtils . assertNotNull ( getObjectRequest , "GetObjectRequest" ) ; GetObjectMetadataRequest getObjectMetadataRequest = RequestCopyUtils . createGetObjectMetadataRequestFrom ( getObjectRequest ) . withPartNumber ( partNumber ) ; return s3 . getObjectMetadata ( getObjectMetadataRequest ) . getContentLength ( ) ; }
Returns the part size of the part

@param getObjectRequest the request to check
@param s3 the s3 client
@param partNumber the part number
@return the part size