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

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

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

import com.qcloud.cos.Headers;
import com.qcloud.cos.http.CosHttpResponse;
import com.qcloud.cos.internal.XmlResponsesSaxParser.CopyObjectResultHandler;

/**
 * Header handler to pull the COS_VERSION_ID header out of the response. This
 * header is required for the copyPart and copyObject api methods.
 */
public class COSVersionHeaderHandler implements HeaderHandler {

    @Override
    public void handle(CopyObjectResultHandler result, CosHttpResponse response) {
        result.setVersionId(response.getHeaders().get(Headers.COS_VERSION_ID));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy