All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qcloud.cos.internal.ServerSideEncryptionHeaderHandler Maven / Gradle / Ivy

The newest version!
package com.qcloud.cos.internal;

import com.qcloud.cos.Headers;
import com.qcloud.cos.http.CosHttpResponse;

/**
 * Base request handler for responses that include a server-side encryption
 * header
 */
public class ServerSideEncryptionHeaderHandler  implements HeaderHandler{

    @Override
    public void handle(T result, CosHttpResponse response) {
        result.setSSEAlgorithm(response.getHeaders().get(Headers.SERVER_SIDE_ENCRYPTION));
        result.setSSECustomerAlgorithm(response.getHeaders().get(Headers.SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM));
        result.setSSECustomerKeyMd5(response.getHeaders().get(Headers.SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5));
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy