public String copyObject(Region region, String sourceContainer,
String sourceObjName, String destContainer, String destObjName)
throws IOException {
HttpPut method = new HttpPut(region.getStorageUrl(destContainer, destObjName));
method.setHeader(Constants.X_COPY_FROM, encode(sourceContainer) + "/" + encode(sourceObjName));
Response response = this.execute(method, new DefaultResponseHandler());
if(response.getStatusCode() == HttpStatus.SC_CREATED) {
return response.getResponseHeader(HttpHeaders.ETAG).getValue();
}
else {
throw new GenericException(response);