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

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

Go to download

A single bundled dependency that includes all service and dependent JARs with third-party libraries relocated to different namespaces.

There is a newer version: 5.6.228
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