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

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

There is a newer version: 5.6.238.2
Show newest version
package com.qcloud.cos.internal;

import com.qcloud.cos.Headers;
import com.qcloud.cos.http.CosHttpResponse;
import com.qcloud.cos.model.AccessControlList;
import com.qcloud.cos.model.CannedAccessControlList;

import java.util.Map;

public class COSDefaultAclHeaderHandler implements HeaderHandler {
    @Override
    public void handle(AccessControlList result, CosHttpResponse response) {
        Map headers = response.getHeaders();
        if(headers.containsKey(Headers.COS_CANNED_ACL) &&
                headers.get(Headers.COS_CANNED_ACL).equals(CannedAccessControlList.Default.toString())) {
            result.setExistDefaultAcl(true);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy