com.qcloud.cos.internal.COSVersionHeaderHandler 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;
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));
}
}