com.qcloud.cos.internal.ServerSideEncryptionHeaderHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cos_api Show documentation
Show all versions of cos_api Show documentation
qcloud cos sdk for inner tencentyun
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));
}
}