private void populateMetadataWithEncryptionParams(ObjectMetadata source, ObjectMetadata destination) {
        Map<String, String> userMetadataSource = source.getUserMetadata();
        Map<String, String> userMetadataDestination = destination.getUserMetadata();

        String[] headersToCopy = { Headers.CRYPTO_CEK_ALGORITHM,
                Headers.CRYPTO_IV, Headers.CRYPTO_KEY, Headers.CRYPTO_KEY_V2,
                Headers.CRYPTO_KEYWRAP_ALGORITHM, Headers.CRYPTO_TAG_LENGTH,
                Headers.MATERIALS_DESCRIPTION,
                Headers.UNENCRYPTED_CONTENT_LENGTH,
                Headers.UNENCRYPTED_CONTENT_MD5 };

        if (userMetadataSource != null) {
            if(userMetadataDestination == null){
                userMetadataDestination= new HashMap<String,String>();
                destination.setUserMetadata(userMetadataDestination);
            }

            String headerValue;
            for(String header : headersToCopy){
                headerValue = userMetadataSource.get(header);
                if(headerValue != null){
                    userMetadataDestination.put(header, headerValue);
                }
            }
        }
    }
Initiates a multipart upload and returns the upload id
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/CopyCallable.java